jobs: remove DelayedJobs.
Remove the DelayedJobs gem and database table. Completes the transition to GoodJob started inc06bfa64fandf4953549a. Downstream users can upgrade as follows: * Stop the Rails server. * Stop the DelayedJobs worker (normally running as `bin/delayed_job` or `bin/rails jobs:work`). * Run `bin/rails jobs:work` to finish any pending delayed jobs. * Run `bin/rails db:migrate` to create the good_jobs table and drop the delayed_jobs table. * Start the Rails server again. * Start the GoodJobs worker with `bin/good_job start`.
This commit is contained in:
24
db/migrate/20220104214319_drop_delayed_jobs.rb
Normal file
24
db/migrate/20220104214319_drop_delayed_jobs.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
class DropDelayedJobs < ActiveRecord::Migration[6.1]
|
||||
def up
|
||||
drop_table :delayed_jobs
|
||||
end
|
||||
|
||||
def down
|
||||
create_table :delayed_jobs do |t|
|
||||
t.integer :priority, default: 0
|
||||
t.integer :attempts, default: 0
|
||||
t.text :handler
|
||||
t.text :last_error
|
||||
t.datetime :run_at
|
||||
t.datetime :locked_at
|
||||
t.datetime :failed_at
|
||||
t.string :locked_by
|
||||
t.timestamps null: false
|
||||
t.string :queue
|
||||
end
|
||||
|
||||
add_index :delayed_jobs, :run_at
|
||||
add_index :delayed_jobs, :locked_at
|
||||
add_index :delayed_jobs, :locked_by
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user