sidekiq 0.11.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq might be problematic. Click here for more details.

data/Changes.md CHANGED
@@ -1,3 +1,14 @@
1
+ 1.0.0
2
+ -----------
3
+
4
+ Thanks to all Sidekiq users and contributors for helping me
5
+ get to this big milestone!
6
+
7
+ - Default concurrency on client-side to 5, not 25 so we don't
8
+ create as many unused Redis connections, same as ActiveRecord's
9
+ default pool size.
10
+ - Ensure redis= is given a Hash or ConnectionPool.
11
+
1
12
  0.11.2
2
13
  -----------
3
14
 
@@ -63,8 +63,10 @@ module Sidekiq
63
63
  def self.redis=(hash)
64
64
  if hash.is_a?(Hash)
65
65
  @redis = RedisConnection.create(hash)
66
- else
66
+ elsif hash.is_a?(ConnectionPool)
67
67
  @redis = hash
68
+ else
69
+ raise ArgumentError, "redis= requires a Hash or ConnectionPool"
68
70
  end
69
71
  end
70
72
 
@@ -64,9 +64,11 @@ module Sidekiq
64
64
  sleep
65
65
  rescue Interrupt
66
66
  logger.info 'Shutting down'
67
- poller.terminate
67
+ poller.terminate if poller.alive?
68
68
  @manager.stop!(:shutdown => true, :timeout => options[:timeout])
69
69
  @manager.wait(:shutdown)
70
+ # Explicitly exit so busy Processor threads can't block
71
+ # process shutdown.
70
72
  exit(0)
71
73
  end
72
74
  end
@@ -38,7 +38,6 @@ module Sidekiq
38
38
  timeout = options[:timeout]
39
39
 
40
40
  @done = true
41
-
42
41
  @fetcher.terminate if @fetcher.alive?
43
42
 
44
43
  logger.info { "Shutting down #{@ready.size} quiet workers" }
@@ -55,7 +54,7 @@ module Sidekiq
55
54
 
56
55
  return after(0) { signal(:shutdown) } if @busy.empty?
57
56
  logger.info { "Pausing up to #{timeout} seconds to allow workers to finish..." }
58
- hard_shutdown_in(timeout) if shutdown
57
+ hard_shutdown_in timeout if shutdown
59
58
  end
60
59
  end
61
60
 
@@ -108,8 +107,8 @@ module Sidekiq
108
107
  private
109
108
 
110
109
  def hard_shutdown_in(delay)
111
- watchdog("Manager#watch_for_shutdown died") do
112
- after(delay) do
110
+ after(delay) do
111
+ watchdog("Manager#watch_for_shutdown died") do
113
112
  # We've reached the timeout and we still have busy workers.
114
113
  # They must die but their messages shall live on.
115
114
  logger.info("Still waiting for #{@busy.size} busy workers")
@@ -7,7 +7,7 @@ module Sidekiq
7
7
  def self.create(options={})
8
8
  url = options[:url] || ENV['REDISTOGO_URL'] || 'redis://localhost:6379/0'
9
9
  # need a connection for Fetcher and Retry
10
- size = options[:size] || (Sidekiq.options[:concurrency] + 2)
10
+ size = options[:size] || (Sidekiq.server? ? (Sidekiq.options[:concurrency] + 2) : 5)
11
11
 
12
12
  ConnectionPool.new(:timeout => 1, :size => size) do
13
13
  build_client(url, options[:namespace])
@@ -1,3 +1,3 @@
1
1
  module Sidekiq
2
- VERSION = "0.11.2"
2
+ VERSION = "1.0.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-07 00:00:00.000000000 Z
12
+ date: 2012-04-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &70143968211720 !ruby/object:Gem::Requirement
16
+ requirement: &70330798429280 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70143968211720
24
+ version_requirements: *70330798429280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: redis-namespace
27
- requirement: &70143968227640 !ruby/object:Gem::Requirement
27
+ requirement: &70330798428820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70143968227640
35
+ version_requirements: *70330798428820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: connection_pool
38
- requirement: &70143968227140 !ruby/object:Gem::Requirement
38
+ requirement: &70330798428040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.9.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70143968227140
46
+ version_requirements: *70330798428040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: celluloid
49
- requirement: &70143968226640 !ruby/object:Gem::Requirement
49
+ requirement: &70330798427300 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.10.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70143968226640
57
+ version_requirements: *70330798427300
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: multi_json
60
- requirement: &70143968226260 !ruby/object:Gem::Requirement
60
+ requirement: &70330798426740 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70143968226260
68
+ version_requirements: *70330798426740
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
- requirement: &70143968225800 !ruby/object:Gem::Requirement
71
+ requirement: &70330798426000 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70143968225800
79
+ version_requirements: *70330798426000
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sinatra
82
- requirement: &70143968225380 !ruby/object:Gem::Requirement
82
+ requirement: &70330798425580 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70143968225380
90
+ version_requirements: *70330798425580
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: slim
93
- requirement: &70143968224960 !ruby/object:Gem::Requirement
93
+ requirement: &70330798425160 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70143968224960
101
+ version_requirements: *70330798425160
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: rake
104
- requirement: &70143968224540 !ruby/object:Gem::Requirement
104
+ requirement: &70330798424740 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70143968224540
112
+ version_requirements: *70330798424740
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: actionmailer
115
- requirement: &70143968224040 !ruby/object:Gem::Requirement
115
+ requirement: &70330798424140 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '3'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70143968224040
123
+ version_requirements: *70330798424140
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: activerecord
126
- requirement: &70143968223540 !ruby/object:Gem::Requirement
126
+ requirement: &70330798439980 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ~>
@@ -131,7 +131,7 @@ dependencies:
131
131
  version: '3'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *70143968223540
134
+ version_requirements: *70330798439980
135
135
  description: Simple, efficient message processing for Ruby
136
136
  email:
137
137
  - mperham@gmail.com
@@ -149,7 +149,6 @@ files:
149
149
  - LICENSE
150
150
  - README.md
151
151
  - Rakefile
152
- - TODO.md
153
152
  - bin/client
154
153
  - bin/sidekiq
155
154
  - bin/sidekiqctl
data/TODO.md DELETED
@@ -1 +0,0 @@
1
- - Make the Web UI less ugly