Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix README: configs are cattrs on Delayed::Worker

  • Loading branch information...
commit 9eb012d6d76b01fe897bfb9e13133e38e6a5e675 1 parent 719b628
@bonkydog authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 README.textile
View
10 README.textile
@@ -44,17 +44,15 @@ The default @MAX_RUN_TIME@ is @4.hours@. If your job takes longer than that, ano
make sure your job doesn't exceed this time. You should set this to the longest time you think the job could take.
By default, it will delete failed jobs (and it always deletes successful jobs). If you want to keep failed jobs, set
-@Delayed::Job.destroy_failed_jobs = false@. The failed jobs will be marked with non-null failed_at.
+@Delayed::Worker.destroy_failed_jobs = false@. The failed jobs will be marked with non-null failed_at.
Here is an example of changing job parameters in Rails:
<pre><code>
# config/initializers/delayed_job_config.rb
- Delayed::Job.destroy_failed_jobs = false
- silence_warnings do
- Delayed::Job.const_set("MAX_ATTEMPTS", 3)
- Delayed::Job.const_set("MAX_RUN_TIME", 5.minutes)
- end
+ Delayed::Worker.destroy_failed_jobs = false
+ Delayed::Worker.max_attempts = 3
+ Delayed::Worker.max_run_time = 5.minutes
</code></pre>
Note: If your error messages are long, consider changing last_error field to a :text instead of a :string (255 character limit).
Please sign in to comment.
Something went wrong with that request. Please try again.