README.md in sidekiq-status-0.3.2 vs README.md in sidekiq-status-0.4.0
- old
+ new
@@ -29,10 +29,13 @@
Sidekiq.configure_server do |config|
config.server_middleware do |chain|
chain.add Sidekiq::Status::ServerMiddleware, expiration: 30.minutes # default
end
+ config.client_middleware do |chain|
+ chain.add Sidekiq::Status::ClientMiddleware
+ end
end
```
After that you can use your jobs as usual and only include `Sidekiq::Status::Worker` module if you want additional functionality of tracking progress and passing any data from job to client.
@@ -44,10 +47,28 @@
# your code goes here
end
end
```
+To overwrite expiration on worker basis and don't use global expiration for all workers write a expiration method like this below:
+
+``` ruby
+class MyJob
+ include Sidekiq::Worker
+
+ def expiration
+ @expiration ||= 60*60*24*30 # 30 days
+ end
+
+ def perform(*args)
+ # your code goes here
+ end
+end
+```
+
+But keep in mind that such thing will store details of job as long as expiration is set, so it may charm your Redis storage/memory consumption. Because Redis stores all data in RAM.
+
### Retrieving status
Query for job status any time later:
``` ruby
@@ -120,16 +141,16 @@
`require 'sidekiq-status/testing/inline'`
### Features coming
* Stopping jobs by id
-* Minimal web UI
## Thanks
+* Clay Allsopp
* Andrew Korzhuev
* Jon Moses
* Wayne Hoover
* Dylan Robinson
## License
MIT License , see LICENSE for more details.
-© 2012 - 2013 Evgeniy Tsvigun
+© 2012 - 2014 Evgeniy Tsvigun