mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
Don't get worker class using eval().
This is a left over from a previous API.
This commit is contained in:
parent
7a0cf8fea3
commit
f4e39af839
1 changed files with 2 additions and 4 deletions
|
@ -2,11 +2,9 @@ module Sidetiq
|
|||
module Schedulable
|
||||
module ClassMethods
|
||||
def tiq(&block)
|
||||
clock = Sidetiq::Clock.instance
|
||||
worker = block.send(:binding).eval('self')
|
||||
|
||||
clock = Sidetiq::Clock.instance
|
||||
clock.synchronize do
|
||||
clock.schedule_for(worker).instance_eval(&block)
|
||||
clock.schedule_for(self).instance_eval(&block)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue