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:
Guo Xiang Tan 2018-09-19 21:58:06 +08:00
parent 0ac64b6d50
commit 6dbe1d832d
2 changed files with 1 additions and 10 deletions

View File

@ -1,7 +1,7 @@
require_dependency "upload_recovery" require_dependency "upload_recovery"
module Jobs module Jobs
class RecoverPostUploads < Jobs::Onceoff class PostUploadsRecovery < Jobs::Onceoff
MIN_PERIOD = 30 MIN_PERIOD = 30
MAX_PERIOD = 120 MAX_PERIOD = 120

View File

@ -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