Change local media attachments to perform heavy processing asynchronously (#13210)
Fix #9106
This commit is contained in:
parent
764b89939f
commit
9660aa4543
15 changed files with 165 additions and 17 deletions
|
@ -9,8 +9,12 @@ class BackupWorker
|
|||
backup_id = msg['args'].first
|
||||
|
||||
ActiveRecord::Base.connection_pool.with_connection do
|
||||
backup = Backup.find(backup_id)
|
||||
backup&.destroy
|
||||
begin
|
||||
backup = Backup.find(backup_id)
|
||||
backup.destroy
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue