README.md in worker-glass-0.2.0 vs README.md in worker-glass-0.2.1
- old
+ new
@@ -32,11 +32,11 @@
### WorkerGlass::Timeout
If you want to provide timeouts for your workers, just prepend WorkerGlass::Timeout to your worker and set the timeout value:
```ruby
-class Worker2 < WorkerGlass::Worker
+class Worker2
prepend WorkerGlass::Timeout
self.timeout = 60 # 1 minute timeout
def perform(first_param, second_param, third_param)
@@ -50,10 +50,10 @@
### WorkerGlass::Reentrancy
If you want to provide reentrancy for your workers, just include WorkerGlass::Reentrancy to your worker and define **after_failure** method that will be executed uppon failure:
```ruby
-class Worker3 < WorkerGlass::Worker
+class Worker3
include WorkerGlass::Reentrancy
def perform(first_param, second_param, third_param)
SomeService.new.process(first_param, second_param, third_param)
end