-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AO3-5578 ActiveStorage copy script performance fixes #5015
AO3-5578 ActiveStorage copy script performance fixes #5015
Conversation
lib/tasks/after_tasks.rake
Outdated
end | ||
|
||
puts "Finished up to ID #{collection.id}" if collection.id.modulo(100).zero? | ||
puts "Finished batch #{index + 1}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because you sleep right after, it would be good to have a $stdout.flush
so that this definitely shows up in the output immediately.
And if you want to be fancy you can do the math for the total batch number that the other find_in_batches
tasks do, but it's definitely not necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not want to do the count for Pseud, it's large enough that I want to touch the table as little as possible (even things that are relatively safe)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞
* AO3-5578 ActiveStorage copy script performance fixes * Flush $stdout to force message visibility
) * AO3-5502 correct page title on adult content warning chapters * AO3-5502 add Cucumber test * AO3-5502 satisfy Rubocop * AO3-5578 ActiveStorage copy script performance fixes (#5015) * AO3-5578 ActiveStorage copy script performance fixes * Flush $stdout to force message visibility * AO3-6873 Upgrade Elasticsearch for dev and automated tests (#5016) * AO3-5578 Avoid unnecessary DB writes when copying icons (#5017) * AO3-5578 Avoid unnecessary DB writes when copying icons * Rubocop :fistshake: * AO3-5578 Add a transaction to Psued image migration (#5018) Add a transaction * AO3-5578 Try to be nicer to the database when copying icons (#5019) * Test listing in s3 * Other tasks & fixes * Experiment with delayed upload * Fixes * Upload after txn * Rubocop things * Fixes * Avoid duplicate attachments * Revert "Avoid duplicate attachments" This reverts commit 476bd02. * AO3-5502 satisfy Rubocop again...? * AO3-5502 satisfy more Rubocop * AO3-5502 formatting improvements * AO3-5502 make sure it's the adult notice page in the test * AO3-5502 add another indent i forgot --------- Co-authored-by: Brian Austin <[email protected]> Co-authored-by: Bilka <[email protected]> Co-authored-by: james_ <[email protected]>
Pull Request Checklist
Issue
https://otwarchive.atlassian.net/browse/AO3-5578
Purpose
Update the icon copy tasks to try to be nicer to the prod database (in particular the pseuds table).