Closed faucetlol closed 1 year ago
Probably because of the rails upgrade, there must have been a change regarding this. I'll check it out. https://github.com/Earlopain/reverser/blob/42aa4713b06fb88b7ae624cdbcf0ce53196b3466/app/models/submission_file.rb#L122-L126
New config run_after_transaction_callbacks_in_order_defined
is true by default which causes an internal after_commit
to run before this and deletes the attachment changes.
Unfortunately this attribute is private api so I'll have to see if there is anything public breaking because of this
Run this to fix stuff up:
last_good_id = 123
SubmissionFile.where("id >= ?", last_good_id).find_each { |sm| SubmissionFileUpdateJob.perform_later(sm) }
That moment when I'm so tired I forget to replace 123
with the actual last good ID and end up queuing 23,712 jobs before I realise what I did wrong
Either way, thanks for the prompt fix as usual!
I'll keep that in mind when posting fixer stuff in the future, lmao
Not sure what's happening here.