librelist archives

« back to archive

[ANN] resque-lock

[ANN] resque-lock

From:
Chris Wanstrath
Date:
2010-04-01 @ 07:37
A Resque plugin that ensures only one instance of your job is running
at a time. Requires Resque 1.7.0.

Install it:

    $ gem install resque-lock

Use it:

    require 'resque/plugins/lock'

    class UpdateNetworkGraph
      extend Resque::Plugins::Lock

      def self.perform(repo_id)
        heavy_lifting
      end
    end

More info:

http://github.com/defunkt/resque-lock#readme


-- 
Chris Wanstrath
http://github.com/defunkt