Steps to reproduce
- Check out repository and run
bundle
. - Run the database migrations
Demonstrating the per-job customizations are ignored
- Run
bundle exec rake delayed_job:mail
- See that the job is enqueued and run successfully, despite the
MailDeliveryJob
having amax_run_time
of 1 second
Demonstrating the desired behavior with the monkey patch
- Run
bundle exec rake delayed_job:mail[true]
- See that the job is enqueued but fails to run, because the execution time is longer than the permitted
max_run_time
declared inMailDeliveryJob
. (ignore that DJ incorrectly reports the default max run time at the console of 14400 seconds which is a known issue with DJ).