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

Setup example code to boot bot, sidekiq & web app.

This commit is contained in:
Tobias Svensson 2013-09-16 13:58:01 +01:00
parent 0291e6981f
commit d9b30f7cfe
4 changed files with 27 additions and 11 deletions

2
examples/Procfile Normal file
View file

@ -0,0 +1,2 @@
sidekiq: bundle exec sidekiq -r ./server.rb
web: bundle exec rackup

13
examples/config.ru Normal file
View file

@ -0,0 +1,13 @@
require 'sidekiq'
require 'sidetiq'
require 'sidekiq/web'
require 'sidetiq/web'
require './workers/simple.rb'
Sidekiq.configure_client do |config|
config.redis = { :size => 1 }
end
run Sidekiq::Web

View file

@ -2,6 +2,7 @@
require 'sidekiq'
require 'sidetiq'
require_relative 'workers/simple'
Sidekiq.logger.level = Logger::DEBUG
@ -11,14 +12,3 @@ Sidekiq.configure_server do |config|
Sidetiq.clock.start!
end
class MyWorker
include Sidekiq::Worker
include Sidetiq::Schedulable
recurrence { secondly }
def perform(*args)
Sidekiq.logger.info "#perform"
end
end

View file

@ -0,0 +1,11 @@
class Simple
include Sidekiq::Worker
include Sidetiq::Schedulable
recurrence { secondly }
def perform(*args)
Sidekiq.logger.info "#perform"
end
end