A Resque plugin. Requires Resque
resque-history adds functionality record recently history of job executions
require 'resque-history'
class UpdateNetworkGraph
extend Resque::Plugins::History
@queue = :network_graph
def self.perform(some_id)
do_stuff(some_id)
end
end
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.
require 'resque-history'
class UpdateNetworkGraph
extend Resque::Plugins::History
@queue = :network_graph
@max_history = 50 # max number of histories to be kept
def self.perform(some_id)
do_stuff(some_id)
end
end
'History' tab in resque web GUI
Add to your Gemfile
$ gem "resque-history"
Add to routes.rb file
require 'resque-history/server'