1
0
Fork 0
mirror of https://github.com/endofunky/sidetiq.git synced 2022-11-09 13:53:30 -05:00
endofunky--sidetiq/examples/simple.rb

23 lines
344 B
Ruby
Raw Normal View History

2013-02-01 12:39:38 -05:00
# Run with `sidekiq -r /path/to/simple.rb`
require 'sidekiq'
2013-01-31 12:42:19 -05:00
require 'sidetiq'
2013-02-01 12:39:38 -05:00
Sidekiq.options[:poll_interval] = 1
2013-01-31 12:42:19 -05:00
Sidekiq.configure_server do |config|
Sidetiq::Clock.start!
end
2013-02-01 12:39:38 -05:00
class MyWorker
2013-01-31 12:42:19 -05:00
include Sidekiq::Worker
include Sidetiq::Schedulable
2013-02-01 12:39:38 -05:00
tiq { secondly }
2013-01-31 12:42:19 -05:00
2013-02-01 12:39:38 -05:00
def perform(*args)
Sidekiq.logger.info "#perform"
end
2013-01-31 12:42:19 -05:00
end