Earlopain / FoxTrove

E6 Upload Helper
GNU General Public License v3.0
6 stars 3 forks source link

Samples not generating #100

Closed faucetlol closed 1 year ago

faucetlol commented 1 year ago

image

Not sure what's happening here.

Earlopain commented 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

Earlopain commented 1 year ago

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

Earlopain commented 1 year ago

Run this to fix stuff up:

last_good_id = 123
SubmissionFile.where("id >= ?", last_good_id).find_each { |sm| SubmissionFileUpdateJob.perform_later(sm) }
faucetlol commented 1 year ago

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!

Earlopain commented 1 year ago

I'll keep that in mind when posting fixer stuff in the future, lmao