README.md in backburner-0.1.2 vs README.md in backburner-0.2.0
- old
+ new
@@ -81,24 +81,24 @@
Backburner is extremely simple to setup. Just configure basic settings for backburner:
```ruby
Backburner.configure do |config|
- config.beanstalk_url = ["beanstalk://127.0.0.1", "beanstalk://127.0.0.1:11301"]
- config.tube_namespace = "some.app.production"
- config.on_error = lambda { |e| puts e }
+ config.beanstalk_url = ["beanstalk://127.0.0.1", "beanstalk://127.0.0.1:11301"]
+ config.tube_namespace = "some.app.production"
+ config.on_error = lambda { |e| puts e }
config.max_job_retries = 3 # default 0 retries
config.retry_delay = 2 # default 5 seconds
config.default_priority = 65536
config.respond_timeout = 120
- config.logger = Logger.new(STDOUT)
+ config.logger = Logger.new(STDOUT)
end
```
* The `beanstalk_url` supports a string such as 'beanstalk://127.0.0.1' or an array of addresses.
* The `tube_namespace` is the prefix used for all tubes related to this backburner queue.
- * The `on_error` is a callback that gets invoked with the error whenever a job fails.
+ * The `on_error` is a callback that gets invoked with the error whenever any job in the system fails.
* The `max_job_retries` determines how many times to retry a job before burying
* The `retry_delay` determines the base time to wait (in secs) between retries
* The `logger` is the logger object written to when backburner wants to report info or errors.
## Usage
@@ -228,9 +228,17 @@
```ruby
Backburner.default_queues << NewsletterJob.queue
```
The `default_queues` stores the specific list of queues that should be processed by default by a worker.
+
+### Hooks
+
+Backburner is highly extensible and can be tailored to your needs by using various hooks that
+can be triggered across the job processing lifecycle.
+Often using hooks is much easier then trying to monkey patch the externals.
+
+Check out [HOOKS.md](HOOKS.md) for a detailed overview on using hooks.
### Failures
When a job fails in backburner (usually because an exception was raised), the job will be released
and retried again (with progressive delays in between) until the `max_job_retries` configuration is reached.
\ No newline at end of file