Rename `Jobs::RecoverPostUploads` to rerun the job.
Running a migration to destroy the onceoff job doesn't work because an instance running the old code may execute the job.
This commit is contained in:
parent
0ac64b6d50
commit
6dbe1d832d
|
@ -1,7 +1,7 @@
|
|||
require_dependency "upload_recovery"
|
||||
|
||||
module Jobs
|
||||
class RecoverPostUploads < Jobs::Onceoff
|
||||
class PostUploadsRecovery < Jobs::Onceoff
|
||||
MIN_PERIOD = 30
|
||||
MAX_PERIOD = 120
|
||||
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
class RemoveRecoverPostUploadsOnceoffLog < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
DB.exec("DELETE FROM onceoff_logs WHERE job_name = 'RecoverPostUploads'")
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue