Skip to content

magoosh/resque-enqueue-logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resque::Plugins::EnqueueLogging

A lightweight Resque plugin to log whenever a job is enqueued. Super handy for debugging! 😄

Gem Version Code Climate

Installation

Add to your Gemfile:

gem "resque-enqueue-logging"

Usage

Just extend Resque::Plugins::EnqueueLogging and all the hooks will be set up.

class SortUserJob
  extend Resque::Plugins::EnqueueLogging

  @queue = :low

  def perform(user_id, options={})
    # do hard work
  end
end

Resque.enqueue SortUserJob, 1, :force => true

In the logfile:

Enqueued SortUserJob to "low": user_id=1, options={"force"=>true}

TODO

  • Add tests
  • Add CI configuration (and test coverage badge)

About

Log whenever a new job is enqueued

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages