jobs: switch from DelayedJob to GoodJob.
Switch the ActiveJob backend from DelayedJob to GoodJob. Differences: * The job worker is run with `bin/good_job start` instead of `bin/delayed_job`. * Jobs have an 8 hour timeout instead of a 4 hour timeout. * Jobs don't automatically retry on failure. * Finishing jobs are preserved and pruned after 7 days.
This commit is contained in:
@@ -45,7 +45,7 @@ Rails.application.configure do
|
||||
# config.cache_store = :mem_cache_store
|
||||
|
||||
# Use a real queuing backend for Active Job (and separate queues per environment).
|
||||
config.active_job.queue_adapter = :delayed_job
|
||||
config.active_job.queue_adapter = :good_job
|
||||
# config.active_job.queue_name_prefix = "danbooru_production"
|
||||
|
||||
config.action_mailer.perform_caching = false
|
||||
|
||||
5
config/initializers/good_job.rb
Normal file
5
config/initializers/good_job.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
GoodJob.retry_on_unhandled_error = false
|
||||
GoodJob.preserve_job_records = true
|
||||
GoodJob.on_thread_error = ->(exception) do
|
||||
DanbooruLogger.log(exception)
|
||||
end
|
||||
Reference in New Issue
Block a user