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:
parent
110cc1dc42
commit
0981f27ab6
2 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue