mirror of
https://github.com/endofunky/sidetiq.git
synced 2022-11-09 13:53:30 -05:00
22 lines
344 B
Ruby
22 lines
344 B
Ruby
# Run with `sidekiq -r /path/to/simple.rb`
|
|
|
|
require 'sidekiq'
|
|
require 'sidetiq'
|
|
|
|
Sidekiq.options[:poll_interval] = 1
|
|
|
|
Sidekiq.configure_server do |config|
|
|
Sidetiq::Clock.start!
|
|
end
|
|
|
|
class MyWorker
|
|
include Sidekiq::Worker
|
|
include Sidetiq::Schedulable
|
|
|
|
tiq { secondly }
|
|
|
|
def perform(*args)
|
|
Sidekiq.logger.info "#perform"
|
|
end
|
|
end
|
|
|