docbrown/config/initializers/delayed_job.rb
Anna Buianova 58b2013377 Fix delayed job errors related to follows #1621 (#1835)
* Add delayed_job_web to dev environment for debugging

* Add specs for the current Follow callbacks implementation

* Move follower touching to ActiveJob

* Spec for the touch followers job

* Move Follow#create_chat_channel to ActiveJob and make the job safe

* Add ActiveJob to send email notifications about follows

* Enqueue SendEmailNotificationJob after the follow is created

* Specs to wnsure jobs are enqueued on Follow creation

* Make CreateChatChannelJob queue name more specific
2019-02-23 18:16:20 -08:00

6 lines
250 B
Ruby

Delayed::Worker.destroy_failed_jobs = !Rails.env.development?
Delayed::Worker.sleep_delay = 60
Delayed::Worker.max_attempts = 10
Delayed::Worker.max_run_time = 30.minutes
Delayed::Worker.read_ahead = 5
# Delayed::Worker.delay_jobs = !Rails.env.test?