README.md in backburner-0.4.3 vs README.md in backburner-0.4.4
- old
+ new
@@ -147,20 +147,26 @@
# optional, defaults to default_priority
def self.queue_priority
1000 # most urgent priority is 0
end
+
+ # optional, defaults to respond_timeout
+ def self.queue_respond_timeout
+ 300 # number of seconds before job times out
+ end
end
```
You can include the optional `Backburner::Queue` module so you can easily specify queue settings for this job:
```ruby
class NewsletterJob
include Backburner::Queue
queue "newsletter-sender" # defaults to 'backburner-jobs' tube
queue_priority 1000 # most urgent priority is 0
+ queue_respond_timeout 300 # number of seconds before job times out
def self.perform(email, body)
NewsletterMailer.deliver_text_to_email(email, body)
end
end
@@ -184,9 +190,10 @@
```ruby
class User
include Backburner::Performable
queue "user-jobs" # defaults to 'user'
queue_priority 500 # most urgent priority is 0
+ queue_respond_timeout 300 # number of seconds before job times out
def activate(device_id)
@device = Device.find(device_id)
# ...
end