Feature #9964

Add type flag to derivative regeneration task

Added by Mike Cantelon about 4 years ago. Updated almost 3 years ago.

Status:VerifiedStart date:06/07/2016
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:CLI tools
Target version:Release 2.4.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

Add a digitalobject:regen-derivatives --type flag with values of "reference" and "thumbnail" to limit derivative generation to the selected type.

History

#2 Updated by Dan Gillean about 4 years ago

  • Requires documentation set to Yes

#3 Updated by David Juhasz about 4 years ago

  • Category set to CLI tools
  • Status changed from New to Feedback
  • Target version set to Release 2.4.0

Hi Mike,

I think there's a bug with this code. At:

https://github.com/artefactual/atom/blob/qa/2.4.x/lib/task/digitalobject/digitalObjectRegenDerivativesTask.class.php#L181

It's deleting all derivatives of the digital object, without regard for the --type flag. I would expect e.g. existing thumbnails and any transcript to be preserved when using --type="reference", and only the reference representations to be deleted and regenerated.

#4 Updated by David Juhasz about 4 years ago

Also, using the --type="reference" doesn't generate a new reference derivative for me.

#6 Updated by David Juhasz about 4 years ago

Oh, I see why:
https://github.com/artefactual/atom/blob/qa/2.3.x/lib/model/QubitDigitalObject.php#L2001

Doesn't do anything with usage_id = QubitTerm::REFERENCE_ID or QubitTerm::THUMBNAIL_ID. As a result the --type flag won't work with PDFs - or video or audio files for that matter. :(

#7 Updated by Mike Cantelon about 4 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Mike Cantelon to David Juhasz

#8 Updated by David Juhasz about 4 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from David Juhasz to Mike Cantelon

Back to you Mike, with feedback in the PR.

#9 Updated by Mike Cantelon about 4 years ago

  • Assignee changed from Mike Cantelon to David Juhasz

OK, back to you for CR.

#10 Updated by David Juhasz about 4 years ago

  • Assignee changed from David Juhasz to Nick Wilkinson

Nick, please assign this to another developer for CR.

#11 Updated by Nick Wilkinson about 4 years ago

  • Status changed from Feedback to Code Review
  • Assignee changed from Nick Wilkinson to Mike Gale

Hi Mike G, can you take a look at this for CR?

#12 Updated by Mike Gale about 4 years ago

  • Assignee changed from Mike Gale to Mike Cantelon

looks good to me

#13 Updated by Mike Cantelon almost 4 years ago

  • Status changed from Code Review to QA/Review
  • Assignee changed from Mike Cantelon to Nick Wilkinson

#14 Updated by Nick Wilkinson almost 4 years ago

  • Assignee changed from Nick Wilkinson to Dan Gillean

Hey Dan, not sure if there's anything to QA here or if it should just be Verified.

#15 Updated by Dan Gillean about 3 years ago

  • Assignee deleted (Dan Gillean)

#16 Updated by Dan Gillean almost 3 years ago

  • Status changed from QA/Review to Verified

Works, but requires the cache to be cleared and php-fpm to be restarted for the updated images to be visible.

#17 Updated by Dan Gillean almost 3 years ago

  • Requires documentation deleted (Yes)

Also available in: Atom PDF