1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Allow access to the JID via #jid, fixes #496

This commit is contained in:
Mike Perham 2012-11-03 20:00:06 -07:00
parent 110cc1dc42
commit 0981f27ab6
2 changed files with 2 additions and 0 deletions

View file

@ -36,6 +36,7 @@ module Sidekiq
msg = Sidekiq.load_json(msgstr)
klass = msg['class'].constantize
worker = klass.new
worker.jid = msg['jid']
stats(worker, msg, queue) do
Sidekiq.server_middleware.invoke(worker, msg, queue) do

View file

@ -24,6 +24,7 @@ module Sidekiq
def self.included(base)
base.extend(ClassMethods)
base.class_attribute :sidekiq_options_hash
base.send(:attr_accessor, :jid)
end
def logger