jobs: remove DelayedJobs.

Remove the DelayedJobs gem and database table. Completes the transition
to GoodJob started in c06bfa64f and f4953549a.

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:
evazion
2022-01-04 15:58:04 -06:00
parent f4953549ae
commit 3841fba78e
6 changed files with 26 additions and 106 deletions

View File

@@ -1,14 +0,0 @@
require 'delayed/plugin'
class DelayedJobTimeoutPlugin < ::Delayed::Plugin
callbacks do |lifecycle|
lifecycle.before(:execute) do |job|
Delayed::Job.connection.execute "set statement_timeout = 0"
end
end
end
Delayed::Worker.logger = Logger.new(STDERR, level: :debug)
Delayed::Worker.default_queue_name = "default"
Delayed::Worker.destroy_failed_jobs = false
Delayed::Worker.plugins << DelayedJobTimeoutPlugin