Show history of recently executed resque jobs
Ruby
Switch branches/tags
Pull request Compare This branch is 95 commits behind ilyakatz:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
test
.document
.gitignore
.rvmrc
.travis.yml
Changelog.md
Gemfile
Gemfile.lock
LICENSE
LICENSE.txt
README.md
README.rdoc
Rakefile
VERSION
resque-history.gemspec

README.md

Resque History alt build status

A Resque plugin. Requires Resque

resque-history adds functionality record recently history of job executions

Usage / Examples

Single Job Instance

    require 'resque-history'

    class UpdateNetworkGraph
      extend Resque::Plugins::History
      @queue = :network_graph

      def 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.

    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

Resque-Web integration

'History' tab in resque web GUI

Resque History GUI

Install

Add to your Gemfile

$ gem "resque-history"

Add to routes.rb file

require 'resque-history/server'