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