Skip to content

davebenvenuti/resque-uuid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

resque-uuid

ResqueUUID will assign random UUIDs to your Resque jobs so that they can be uniquely identified.

Usage

require 'resque'
require 'resque-uuid'

Resque::Plugins::ResqueUUID.enable!

UUIDs can be returned via:

  • Resque::Job#uuid
  • YourJobPayloadClass.uuid, if your payload class responds to .uuid= and .uuid

Additionally, your payload class can define an after_uuid_generated callback, which will be called with the newly-generated uuid and job args after the job is enqueued

class MyJobClass

   def self.after_uuid_generated(uuid, *args)
    # do some record keeping or something
   end

end

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages