Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilyakatz/resque-history
Show history of recently executed resque jobs
https://github.com/ilyakatz/resque-history
Last synced: 4 days ago
JSON representation
Show history of recently executed resque jobs
- Host: GitHub
- URL: https://github.com/ilyakatz/resque-history
- Owner: ilyakatz
- License: mit
- Created: 2012-03-29T21:30:36.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:19:50.000Z (about 2 years ago)
- Last Synced: 2025-01-09T03:36:17.605Z (11 days ago)
- Language: Ruby
- Homepage: http://ilyakatz.github.io/resque-history
- Size: 179 KB
- Stars: 41
- Watchers: 3
- Forks: 16
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Changelog: Changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# Resque History
[![alt build status][1]][2]
[![Dependency Status](http://img.shields.io/gemnasium/ilyakatz/he.svg)](https://gemnasium.com/ilyakatz/resque-history)
[![Code Climate](http://img.shields.io/codeclimate/github/ilyakatz/resque-history.svg)](https://codeclimate.com/github/ilyakatz/resque-history)
[![Gem Version](http://img.shields.io/gem/v/resque-history.svg)](http://badge.fury.io/rb/resque-history)[1]: http://img.shields.io/travis/ilyakatz/resque-history.svg
[2]: http://travis-ci.org/#!/ilyakatz/resque-historyA [Resque][rq] plugin. Requires Resque
resque-history adds functionality record recently history of job executions
Usage / Examples
----------------### Single Job Instance
```ruby
require 'resque-history'class UpdateNetworkGraph
extend Resque::Plugins::History
@queue = :network_graphdef self.perform(some_id)
do_stuff(some_id)
end
end
```### Job History
By default resque-history stores 500 history items on redis,
but if you want to store less items, assign @max_history in the job class.```ruby
require 'resque-history'class UpdateNetworkGraph
extend Resque::Plugins::History
@queue = :network_graph
@max_history = 50 # max number of histories to be keptdef self.perform(some_id)
do_stuff(some_id)
end
end
```### 3rd Party classes
If you want to use resque history with 3rd party resque jobs,
extended the classes that you want to be recorded in history```ruby
[
CarrierWave::Workers::ProcessAsset,
CarrierWave::Workers::StoreAsset,
ActionMailer::DeliveryMethods
].each do |klazz|
klazz.class_eval do
extend Resque::Plugins::History
end
end
```Resque-Web integration
----------------------'History' tab in resque web GUI
![Resque History GUI](https://monosnap.com/file/0FNT1ZINLWlRS0in5JPxYVKjCa3v84.png)
Install
=======Add to your Gemfile
$ gem "resque-history"
Add to routes.rb file
require 'resque-history/server'
[rq]: https://github.com/resque/resque