XF 2.2 Can you rebuild only specific attachments by ID?

Fullmental

Active member
We're in the middle of a large migration from remote to locally hosted files. A few attachments wound up not converting due to total pixel size limitations. we've adjusted the parameter per this post and confirmed it works for new attachmens of the same size:


However, rebuilding the entire thumbnail cache one by one would take hours now. We only need to convert a range of about 100 towards the end of the list. Is there a way to specify a range of IDs for the rebuild job, either in ACP or CLI?

For example: we have 10,000 attachments. We want to rebuild thumbnails for attachments 8800-8900.
 
I don't believe you can pass params via CLI for that.

You will need to modify the PHP code.

What's the issue with letting the rebuild job run?
You can still use the site as normal.
 
I don't believe you can pass params via CLI for that.

You will need to modify the PHP code.

What's the issue with letting the rebuild job run?
You can still use the site as normal.
No real issue, the only concern is I don't particularly like having to monitor the rebuild process to know when it's fixed. It goes maybe 20-30 thumbnails per refresh? That's a long time to get into the 10,000 range. In the meantime we're hitting the database pretty hard elsewhere too, so it actually could be slowing other queries down.

Really we're just looking into as many ways as possible that we can maximize efficiency while we have a few dozen other scripts to run.
 
I just quickly checked the code and it doesn't seem like there is one for rebuilding attachment thumbnails.

So it will have to be done via the ACP/browser.

You should be able to modify the code to target a specific range or even individual attachments.
 
Back
Top Bottom