Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix README: configs are cattrs on Delayed::Worker #48

Closed
wants to merge 1 commit into from

1 participant

@bonkydog

Hello, tobi.

Thanks for maintaining delayed_job. It's awesome.

I noticed that the initializer example seems to have become wrong.

Here's a fix.

Best,
bonkydog

@bonkydog bonkydog closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 24, 2011
  1. @bonkydog
This page is out of date. Refresh to see the latest.
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).
Something went wrong with that request. Please try again.