command-line (drush-based) way to regenerate derivitives?

232 views
Skip to first unread message

Brad Spry

unread,
Aug 3, 2015, 3:48:06 PM8/3/15
to islandora
Searching for a command-line, hopefully drush-based way to regenerate child derivatives on a specified list of multiple objects or for an entire collection.

Web-based method: Collection > Manage > Collection > Regenerate child derivatives

The web-based method is susceptible to timeout and error, especially AJAX HTTP errors.   This happens very frequently for large objects; web browsers just aren't designed to hold open a connection for a very long time...  When such an error happens, the process is completely derailed...

Command-line methods on the other hand can be ran in the background "nohup command &" and stay running until completion.

I've found a couple of couple of scripts below, testing the "co-alliance" script, which works on a single object. 

Question: are there are any other known, available, working solutions?

ryersonlibrary / regenSelectDerivatives.php
https://github.com/ryersonlibrary/islandora_scripts/blob/master/regenSelectDerivatives.php

co-alliance / coalliance_derivative_generation
https://github.com/co-alliance/coalliance_derivative_generation


Sincerely,

Brad Spry
Atkins Library
UNC Charlotte

Jared Whiklo

unread,
Aug 4, 2015, 12:28:54 PM8/4/15
to islandora
Hi Brad,

I'm hoping you saw the previous responses, for whatever reason they did seem to come back to this topic. They are here:

Regarding Nick's post about our (the University of Manitoba's) maintenance scripts[1]. I used this to generate the missing derivatives for a bunch of newspapers (30K-40K). 

The command does the derivative regeneration as a two step process. First is to fill a queue with the PIDs[2] then you execute against that queue[3].

It is *not* currently designed to handle regenerating existing derivatives, but I have been wanting to change this. 

I think it might be easy enough to modify the pre-process stage to load the queue with an object containing the PIDs and then you could add a --force argument (like this one[4]) and use that in the worker function here[5].

I haven't had time but if you want to fork the repo and do any of the above (*wink* *wink*) I love to add this to our tools.

cheers,

Brad Spry

unread,
Aug 5, 2015, 12:40:20 PM8/5/15
to islandora
>>>I'm hoping you saw the previous responses, for whatever reason they did seem to come back to this topic.

Yes, it was very odd how replies ended up in another thread...

Regardless, I found them and am so thankful for your replies! Thank you Mr. McFate and Mr. Whiklo!


<B


Reply all
Reply to author
Forward
0 new messages