mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Last minute fixes
This commit is contained in:
parent
7b24f0fb49
commit
29a89d7a25
8 changed files with 47 additions and 46 deletions
|
@ -1,4 +1,4 @@
|
|||
0.5.0
|
||||
0.5.1
|
||||
-----------
|
||||
|
||||
- Initial release!
|
||||
|
|
|
@ -23,9 +23,12 @@ module Sidekiq
|
|||
begin
|
||||
log 'Starting processing, hit Ctrl-C to stop'
|
||||
manager.start!
|
||||
# HACK need to determine how to pause main thread while
|
||||
# waiting for signals.
|
||||
sleep FOREVER
|
||||
rescue Interrupt
|
||||
log 'Shutting down...'
|
||||
# TODO Need clean shutdown support from Celluloid
|
||||
log 'Shutting down, pausing 5 seconds to let workers finish...'
|
||||
manager.stop!
|
||||
manager.wait(:shutdown)
|
||||
end
|
||||
|
|
|
@ -7,7 +7,8 @@ module Sidekiq
|
|||
def self.redis
|
||||
@redis ||= begin
|
||||
# autoconfig for Heroku
|
||||
hash = { :url => ENV['REDISTOGO_URL'] } if ENV['REDISTOGO_URL']
|
||||
hash = {}
|
||||
hash[:url] = ENV['REDISTOGO_URL'] if ENV['REDISTOGO_URL']
|
||||
Redis.connect(hash)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,6 +26,7 @@ module Sidekiq
|
|||
@queue_idx = 0
|
||||
@queues_size = @queues.size
|
||||
@redis = Redis.connect(:url => location)
|
||||
@done_callback = nil
|
||||
|
||||
@done = false
|
||||
@busy = []
|
||||
|
@ -54,7 +55,7 @@ module Sidekiq
|
|||
end
|
||||
|
||||
def processor_done(processor)
|
||||
@done_callback.call(processor)
|
||||
@done_callback.call(processor) if @done_callback
|
||||
@busy.delete(processor)
|
||||
if stopped?
|
||||
processor.terminate
|
||||
|
|
|
@ -83,7 +83,7 @@ module Sidekiq
|
|||
def call(*)
|
||||
yield
|
||||
ensure
|
||||
ActiveRecord::Base.clear_active_connections! if defined?(::ActiveRecord)
|
||||
::ActiveRecord::Base.clear_active_connections! if defined?(::ActiveRecord)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
module Sidekiq
|
||||
VERSION = "0.5.0"
|
||||
VERSION = "0.5.1"
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rails', '3.2.0'
|
||||
gem 'rails', '3.2.1'
|
||||
gem 'sqlite3'
|
||||
gem 'sidekiq', :path => '..'
|
||||
gem 'sidekiq'#, :path => '..'
|
||||
|
|
|
@ -1,50 +1,41 @@
|
|||
PATH
|
||||
remote: ..
|
||||
specs:
|
||||
sidekiq (0.1.0)
|
||||
celluloid
|
||||
connection_pool
|
||||
multi_json
|
||||
redis
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionmailer (3.2.0)
|
||||
actionpack (= 3.2.0)
|
||||
actionmailer (3.2.1)
|
||||
actionpack (= 3.2.1)
|
||||
mail (~> 2.4.0)
|
||||
actionpack (3.2.0)
|
||||
activemodel (= 3.2.0)
|
||||
activesupport (= 3.2.0)
|
||||
actionpack (3.2.1)
|
||||
activemodel (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
builder (~> 3.0.0)
|
||||
erubis (~> 2.7.0)
|
||||
journey (~> 1.0.0)
|
||||
journey (~> 1.0.1)
|
||||
rack (~> 1.4.0)
|
||||
rack-cache (~> 1.1)
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.1.2)
|
||||
activemodel (3.2.0)
|
||||
activesupport (= 3.2.0)
|
||||
activemodel (3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
builder (~> 3.0.0)
|
||||
activerecord (3.2.0)
|
||||
activemodel (= 3.2.0)
|
||||
activesupport (= 3.2.0)
|
||||
activerecord (3.2.1)
|
||||
activemodel (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
arel (~> 3.0.0)
|
||||
tzinfo (~> 0.3.29)
|
||||
activeresource (3.2.0)
|
||||
activemodel (= 3.2.0)
|
||||
activesupport (= 3.2.0)
|
||||
activesupport (3.2.0)
|
||||
activeresource (3.2.1)
|
||||
activemodel (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
activesupport (3.2.1)
|
||||
i18n (~> 0.6)
|
||||
multi_json (~> 1.0)
|
||||
arel (3.0.0)
|
||||
builder (3.0.0)
|
||||
celluloid (0.7.2)
|
||||
celluloid (0.8.0)
|
||||
connection_pool (0.1.0)
|
||||
erubis (2.7.0)
|
||||
hike (1.2.1)
|
||||
i18n (0.6.0)
|
||||
journey (1.0.0)
|
||||
journey (1.0.1)
|
||||
json (1.6.5)
|
||||
mail (2.4.1)
|
||||
i18n (>= 0.4.0)
|
||||
|
@ -60,17 +51,17 @@ GEM
|
|||
rack
|
||||
rack-test (0.6.1)
|
||||
rack (>= 1.0)
|
||||
rails (3.2.0)
|
||||
actionmailer (= 3.2.0)
|
||||
actionpack (= 3.2.0)
|
||||
activerecord (= 3.2.0)
|
||||
activeresource (= 3.2.0)
|
||||
activesupport (= 3.2.0)
|
||||
rails (3.2.1)
|
||||
actionmailer (= 3.2.1)
|
||||
actionpack (= 3.2.1)
|
||||
activerecord (= 3.2.1)
|
||||
activeresource (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.2.0)
|
||||
railties (3.2.0)
|
||||
actionpack (= 3.2.0)
|
||||
activesupport (= 3.2.0)
|
||||
railties (= 3.2.1)
|
||||
railties (3.2.1)
|
||||
actionpack (= 3.2.1)
|
||||
activesupport (= 3.2.1)
|
||||
rack-ssl (~> 1.3.2)
|
||||
rake (>= 0.8.7)
|
||||
rdoc (~> 3.4)
|
||||
|
@ -79,6 +70,11 @@ GEM
|
|||
rdoc (3.12)
|
||||
json (~> 1.4)
|
||||
redis (2.2.2)
|
||||
sidekiq (0.5.1)
|
||||
celluloid
|
||||
connection_pool
|
||||
multi_json
|
||||
redis
|
||||
sprockets (2.1.2)
|
||||
hike (~> 1.2)
|
||||
rack (~> 1.0)
|
||||
|
@ -95,6 +91,6 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
rails (= 3.2.0)
|
||||
sidekiq!
|
||||
rails (= 3.2.1)
|
||||
sidekiq
|
||||
sqlite3
|
||||
|
|
Loading…
Add table
Reference in a new issue