sidekiq 3.4.1 → 4.0.2
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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/4.0-Upgrade.md +50 -0
- data/COMM-LICENSE +55 -45
- data/Changes.md +85 -1
- data/Ent-Changes.md +79 -0
- data/Gemfile +7 -1
- data/Pro-2.0-Upgrade.md +2 -2
- data/Pro-3.0-Upgrade.md +46 -0
- data/Pro-Changes.md +60 -2
- data/README.md +20 -16
- data/bin/sidekiq +4 -0
- data/bin/sidekiqctl +8 -2
- data/bin/sidekiqload +167 -0
- data/lib/generators/sidekiq/templates/worker_spec.rb.erb +2 -2
- data/lib/generators/sidekiq/templates/worker_test.rb.erb +5 -5
- data/lib/sidekiq/api.rb +43 -33
- data/lib/sidekiq/cli.rb +41 -42
- data/lib/sidekiq/client.rb +5 -10
- data/lib/sidekiq/fetch.rb +35 -111
- data/lib/sidekiq/launcher.rb +102 -42
- data/lib/sidekiq/manager.rb +80 -180
- data/lib/sidekiq/middleware/server/logging.rb +13 -8
- data/lib/sidekiq/middleware/server/retry_jobs.rb +6 -6
- data/lib/sidekiq/processor.rb +126 -97
- data/lib/sidekiq/redis_connection.rb +23 -5
- data/lib/sidekiq/scheduled.rb +47 -26
- data/lib/sidekiq/testing.rb +139 -17
- data/lib/sidekiq/util.rb +20 -0
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web.rb +17 -1
- data/lib/sidekiq/web_helpers.rb +33 -5
- data/lib/sidekiq/worker.rb +16 -0
- data/lib/sidekiq.rb +37 -14
- data/sidekiq.gemspec +10 -11
- data/test/helper.rb +45 -10
- data/test/test_actors.rb +137 -0
- data/test/test_api.rb +417 -384
- data/test/test_cli.rb +29 -59
- data/test/test_client.rb +60 -135
- data/test/test_extensions.rb +29 -23
- data/test/test_fetch.rb +2 -57
- data/test/test_launcher.rb +80 -0
- data/test/test_logging.rb +1 -1
- data/test/test_manager.rb +16 -131
- data/test/test_middleware.rb +3 -5
- data/test/test_processor.rb +110 -76
- data/test/test_rails.rb +21 -0
- data/test/test_redis_connection.rb +0 -1
- data/test/test_retry.rb +114 -162
- data/test/test_scheduled.rb +11 -17
- data/test/test_scheduling.rb +20 -42
- data/test/test_sidekiq.rb +46 -16
- data/test/test_testing.rb +80 -20
- data/test/test_testing_fake.rb +83 -8
- data/test/test_testing_inline.rb +3 -3
- data/test/test_util.rb +16 -0
- data/test/test_web.rb +28 -9
- data/test/test_web_helpers.rb +3 -2
- data/web/assets/images/favicon.ico +0 -0
- data/web/assets/javascripts/application.js +6 -1
- data/web/assets/javascripts/dashboard.js +2 -8
- data/web/assets/javascripts/locales/jquery.timeago.pt-br.js +14 -14
- data/web/assets/stylesheets/application.css +33 -56
- data/web/locales/de.yml +1 -1
- data/web/locales/en.yml +2 -0
- data/web/locales/fr.yml +2 -2
- data/web/locales/ja.yml +10 -1
- data/web/locales/{no.yml → nb.yml} +10 -2
- data/web/locales/uk.yml +76 -0
- data/web/views/_footer.erb +2 -7
- data/web/views/_job_info.erb +5 -1
- data/web/views/_nav.erb +2 -2
- data/web/views/_poll_js.erb +5 -0
- data/web/views/{_poll.erb → _poll_link.erb} +0 -3
- data/web/views/busy.erb +2 -1
- data/web/views/dead.erb +1 -0
- data/web/views/layout.erb +2 -0
- data/web/views/morgue.erb +3 -0
- data/web/views/queue.erb +1 -0
- data/web/views/queues.erb +1 -0
- data/web/views/retries.erb +3 -0
- data/web/views/retry.erb +1 -0
- data/web/views/scheduled.erb +1 -0
- data/web/views/scheduled_job_info.erb +1 -0
- metadata +75 -55
- data/lib/sidekiq/actor.rb +0 -39
- data/test/test_worker_generator.rb +0 -17
metadata
CHANGED
@@ -1,156 +1,164 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Perham
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.6
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
17
|
+
- - "~>"
|
25
18
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: redis-namespace
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
19
|
+
version: '3.2'
|
31
20
|
- - ">="
|
32
21
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
22
|
+
version: 3.2.1
|
34
23
|
type: :runtime
|
35
24
|
prerelease: false
|
36
25
|
version_requirements: !ruby/object:Gem::Requirement
|
37
26
|
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.2'
|
38
30
|
- - ">="
|
39
31
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
32
|
+
version: 3.2.1
|
41
33
|
- !ruby/object:Gem::Dependency
|
42
34
|
name: connection_pool
|
43
35
|
requirement: !ruby/object:Gem::Requirement
|
44
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '2.2'
|
45
40
|
- - ">="
|
46
41
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
42
|
+
version: 2.2.0
|
48
43
|
type: :runtime
|
49
44
|
prerelease: false
|
50
45
|
version_requirements: !ruby/object:Gem::Requirement
|
51
46
|
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '2.2'
|
52
50
|
- - ">="
|
53
51
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
52
|
+
version: 2.2.0
|
55
53
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
54
|
+
name: concurrent-ruby
|
57
55
|
requirement: !ruby/object:Gem::Requirement
|
58
56
|
requirements:
|
59
57
|
- - "~>"
|
60
58
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
59
|
+
version: '1.0'
|
62
60
|
type: :runtime
|
63
61
|
prerelease: false
|
64
62
|
version_requirements: !ruby/object:Gem::Requirement
|
65
63
|
requirements:
|
66
64
|
- - "~>"
|
67
65
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
66
|
+
version: '1.0'
|
69
67
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
68
|
+
name: redis-namespace
|
71
69
|
requirement: !ruby/object:Gem::Requirement
|
72
70
|
requirements:
|
71
|
+
- - "~>"
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '1.5'
|
73
74
|
- - ">="
|
74
75
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
76
|
-
type: :
|
76
|
+
version: 1.5.2
|
77
|
+
type: :development
|
77
78
|
prerelease: false
|
78
79
|
version_requirements: !ruby/object:Gem::Requirement
|
79
80
|
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '1.5'
|
80
84
|
- - ">="
|
81
85
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
86
|
+
version: 1.5.2
|
83
87
|
- !ruby/object:Gem::Dependency
|
84
88
|
name: sinatra
|
85
89
|
requirement: !ruby/object:Gem::Requirement
|
86
90
|
requirements:
|
91
|
+
- - "~>"
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '1.4'
|
87
94
|
- - ">="
|
88
95
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
96
|
+
version: 1.4.6
|
90
97
|
type: :development
|
91
98
|
prerelease: false
|
92
99
|
version_requirements: !ruby/object:Gem::Requirement
|
93
100
|
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.4'
|
94
104
|
- - ">="
|
95
105
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
106
|
+
version: 1.4.6
|
97
107
|
- !ruby/object:Gem::Dependency
|
98
108
|
name: minitest
|
99
109
|
requirement: !ruby/object:Gem::Requirement
|
100
110
|
requirements:
|
101
111
|
- - "~>"
|
102
112
|
- !ruby/object:Gem::Version
|
103
|
-
version: 5.
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 5.3.3
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rake
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
113
|
+
version: '5.7'
|
115
114
|
- - ">="
|
116
115
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
116
|
+
version: 5.7.0
|
118
117
|
type: :development
|
119
118
|
prerelease: false
|
120
119
|
version_requirements: !ruby/object:Gem::Requirement
|
121
120
|
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '5.7'
|
122
124
|
- - ">="
|
123
125
|
- !ruby/object:Gem::Version
|
124
|
-
version:
|
126
|
+
version: 5.7.0
|
125
127
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
128
|
+
name: rake
|
127
129
|
requirement: !ruby/object:Gem::Requirement
|
128
130
|
requirements:
|
129
131
|
- - "~>"
|
130
132
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
133
|
+
version: '10.0'
|
132
134
|
type: :development
|
133
135
|
prerelease: false
|
134
136
|
version_requirements: !ruby/object:Gem::Requirement
|
135
137
|
requirements:
|
136
138
|
- - "~>"
|
137
139
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
140
|
+
version: '10.0'
|
139
141
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
142
|
+
name: rails
|
141
143
|
requirement: !ruby/object:Gem::Requirement
|
142
144
|
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '4'
|
143
148
|
- - ">="
|
144
149
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
150
|
+
version: 3.2.0
|
146
151
|
type: :development
|
147
152
|
prerelease: false
|
148
153
|
version_requirements: !ruby/object:Gem::Requirement
|
149
154
|
requirements:
|
155
|
+
- - "~>"
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '4'
|
150
158
|
- - ">="
|
151
159
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
153
|
-
description: Simple, efficient background processing for Ruby
|
160
|
+
version: 3.2.0
|
161
|
+
description: Simple, efficient background processing for Ruby.
|
154
162
|
email:
|
155
163
|
- mperham@gmail.com
|
156
164
|
executables:
|
@@ -162,23 +170,26 @@ files:
|
|
162
170
|
- ".gitignore"
|
163
171
|
- ".travis.yml"
|
164
172
|
- 3.0-Upgrade.md
|
173
|
+
- 4.0-Upgrade.md
|
165
174
|
- COMM-LICENSE
|
166
175
|
- Changes.md
|
167
176
|
- Contributing.md
|
177
|
+
- Ent-Changes.md
|
168
178
|
- Gemfile
|
169
179
|
- LICENSE
|
170
180
|
- Pro-2.0-Upgrade.md
|
181
|
+
- Pro-3.0-Upgrade.md
|
171
182
|
- Pro-Changes.md
|
172
183
|
- README.md
|
173
184
|
- Rakefile
|
174
185
|
- bin/sidekiq
|
175
186
|
- bin/sidekiqctl
|
187
|
+
- bin/sidekiqload
|
176
188
|
- lib/generators/sidekiq/templates/worker.rb.erb
|
177
189
|
- lib/generators/sidekiq/templates/worker_spec.rb.erb
|
178
190
|
- lib/generators/sidekiq/templates/worker_test.rb.erb
|
179
191
|
- lib/generators/sidekiq/worker_generator.rb
|
180
192
|
- lib/sidekiq.rb
|
181
|
-
- lib/sidekiq/actor.rb
|
182
193
|
- lib/sidekiq/api.rb
|
183
194
|
- lib/sidekiq/cli.rb
|
184
195
|
- lib/sidekiq/client.rb
|
@@ -215,16 +226,19 @@ files:
|
|
215
226
|
- test/fake_env.rb
|
216
227
|
- test/fixtures/en.yml
|
217
228
|
- test/helper.rb
|
229
|
+
- test/test_actors.rb
|
218
230
|
- test/test_api.rb
|
219
231
|
- test/test_cli.rb
|
220
232
|
- test/test_client.rb
|
221
233
|
- test/test_exception_handler.rb
|
222
234
|
- test/test_extensions.rb
|
223
235
|
- test/test_fetch.rb
|
236
|
+
- test/test_launcher.rb
|
224
237
|
- test/test_logging.rb
|
225
238
|
- test/test_manager.rb
|
226
239
|
- test/test_middleware.rb
|
227
240
|
- test/test_processor.rb
|
241
|
+
- test/test_rails.rb
|
228
242
|
- test/test_redis_connection.rb
|
229
243
|
- test/test_retry.rb
|
230
244
|
- test/test_scheduled.rb
|
@@ -233,11 +247,12 @@ files:
|
|
233
247
|
- test/test_testing.rb
|
234
248
|
- test/test_testing_fake.rb
|
235
249
|
- test/test_testing_inline.rb
|
250
|
+
- test/test_util.rb
|
236
251
|
- test/test_web.rb
|
237
252
|
- test/test_web_helpers.rb
|
238
|
-
- test/test_worker_generator.rb
|
239
253
|
- web/assets/images/bootstrap/glyphicons-halflings-white.png
|
240
254
|
- web/assets/images/bootstrap/glyphicons-halflings.png
|
255
|
+
- web/assets/images/favicon.ico
|
241
256
|
- web/assets/images/logo.png
|
242
257
|
- web/assets/images/status-sd8051fd480.png
|
243
258
|
- web/assets/images/status/active.png
|
@@ -302,21 +317,23 @@ files:
|
|
302
317
|
- web/locales/it.yml
|
303
318
|
- web/locales/ja.yml
|
304
319
|
- web/locales/ko.yml
|
320
|
+
- web/locales/nb.yml
|
305
321
|
- web/locales/nl.yml
|
306
|
-
- web/locales/no.yml
|
307
322
|
- web/locales/pl.yml
|
308
323
|
- web/locales/pt-br.yml
|
309
324
|
- web/locales/pt.yml
|
310
325
|
- web/locales/ru.yml
|
311
326
|
- web/locales/sv.yml
|
312
327
|
- web/locales/ta.yml
|
328
|
+
- web/locales/uk.yml
|
313
329
|
- web/locales/zh-cn.yml
|
314
330
|
- web/locales/zh-tw.yml
|
315
331
|
- web/views/_footer.erb
|
316
332
|
- web/views/_job_info.erb
|
317
333
|
- web/views/_nav.erb
|
318
334
|
- web/views/_paging.erb
|
319
|
-
- web/views/
|
335
|
+
- web/views/_poll_js.erb
|
336
|
+
- web/views/_poll_link.erb
|
320
337
|
- web/views/_status.erb
|
321
338
|
- web/views/_summary.erb
|
322
339
|
- web/views/busy.erb
|
@@ -350,7 +367,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
367
|
version: '0'
|
351
368
|
requirements: []
|
352
369
|
rubyforge_project:
|
353
|
-
rubygems_version: 2.
|
370
|
+
rubygems_version: 2.5.1
|
354
371
|
signing_key:
|
355
372
|
specification_version: 4
|
356
373
|
summary: Simple, efficient background processing for Ruby
|
@@ -360,16 +377,19 @@ test_files:
|
|
360
377
|
- test/fake_env.rb
|
361
378
|
- test/fixtures/en.yml
|
362
379
|
- test/helper.rb
|
380
|
+
- test/test_actors.rb
|
363
381
|
- test/test_api.rb
|
364
382
|
- test/test_cli.rb
|
365
383
|
- test/test_client.rb
|
366
384
|
- test/test_exception_handler.rb
|
367
385
|
- test/test_extensions.rb
|
368
386
|
- test/test_fetch.rb
|
387
|
+
- test/test_launcher.rb
|
369
388
|
- test/test_logging.rb
|
370
389
|
- test/test_manager.rb
|
371
390
|
- test/test_middleware.rb
|
372
391
|
- test/test_processor.rb
|
392
|
+
- test/test_rails.rb
|
373
393
|
- test/test_redis_connection.rb
|
374
394
|
- test/test_retry.rb
|
375
395
|
- test/test_scheduled.rb
|
@@ -378,6 +398,6 @@ test_files:
|
|
378
398
|
- test/test_testing.rb
|
379
399
|
- test/test_testing_fake.rb
|
380
400
|
- test/test_testing_inline.rb
|
401
|
+
- test/test_util.rb
|
381
402
|
- test/test_web.rb
|
382
403
|
- test/test_web_helpers.rb
|
383
|
-
- test/test_worker_generator.rb
|
data/lib/sidekiq/actor.rb
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
module Sidekiq
|
2
|
-
module Actor
|
3
|
-
|
4
|
-
module ClassMethods
|
5
|
-
def trap_exit(*args)
|
6
|
-
end
|
7
|
-
def new_link(*args)
|
8
|
-
new(*args)
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
module InstanceMethods
|
13
|
-
def current_actor
|
14
|
-
self
|
15
|
-
end
|
16
|
-
def after(interval)
|
17
|
-
end
|
18
|
-
def alive?
|
19
|
-
@dead = false unless defined?(@dead)
|
20
|
-
!@dead
|
21
|
-
end
|
22
|
-
def terminate
|
23
|
-
@dead = true
|
24
|
-
end
|
25
|
-
def defer
|
26
|
-
yield
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.included(klass)
|
31
|
-
if $TESTING
|
32
|
-
klass.__send__(:include, InstanceMethods)
|
33
|
-
klass.__send__(:extend, ClassMethods)
|
34
|
-
else
|
35
|
-
klass.__send__(:include, Celluloid)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
require_relative 'helper'
|
2
|
-
require 'rails/generators/test_case'
|
3
|
-
require 'generators/sidekiq/worker_generator'
|
4
|
-
|
5
|
-
class WorkerGeneratorTest < Rails::Generators::TestCase
|
6
|
-
tests Sidekiq::Generators::WorkerGenerator
|
7
|
-
arguments %w(foo)
|
8
|
-
destination File.expand_path("../tmp", File.dirname(__FILE__))
|
9
|
-
setup :prepare_destination
|
10
|
-
|
11
|
-
test "worker is created and its test" do
|
12
|
-
run_generator
|
13
|
-
|
14
|
-
assert_file "app/workers/foo_worker.rb"
|
15
|
-
assert_file "test/workers/foo_worker_test.rb"
|
16
|
-
end
|
17
|
-
end
|