1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00
endofunky--sidetiq/lib/sidetiq/schedulable.rb
Tobias Svensson f4e39af839 Don't get worker class using eval().
This is a left over from a previous API.
2013-02-01 09:35:25 +00:00

17 lines
342 B
Ruby

module Sidetiq
module Schedulable
module ClassMethods
def tiq(&block)
clock = Sidetiq::Clock.instance
clock.synchronize do
clock.schedule_for(self).instance_eval(&block)
end
end
end
def self.included(klass)
klass.extend(Sidetiq::Schedulable::ClassMethods)
end
end
end