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

19 lines
278 B
Ruby
Raw Normal View History

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