sidekiq 4.1.1 → 4.1.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 -0
- data/COMM-LICENSE +1 -1
- data/Changes.md +7 -0
- data/Ent-Changes.md +6 -0
- data/Gemfile +1 -0
- data/Pro-3.0-Upgrade.md +5 -7
- data/Pro-Changes.md +35 -0
- data/README.md +2 -1
- data/bin/sidekiqload +2 -2
- data/lib/sidekiq.rb +1 -0
- data/lib/sidekiq/api.rb +3 -1
- data/lib/sidekiq/cli.rb +1 -0
- data/lib/sidekiq/client.rb +10 -3
- data/lib/sidekiq/core_ext.rb +1 -0
- data/lib/sidekiq/exception_handler.rb +2 -1
- data/lib/sidekiq/extensions/action_mailer.rb +1 -0
- data/lib/sidekiq/extensions/active_record.rb +1 -0
- data/lib/sidekiq/extensions/class_methods.rb +1 -0
- data/lib/sidekiq/extensions/generic_proxy.rb +1 -0
- data/lib/sidekiq/fetch.rb +1 -0
- data/lib/sidekiq/launcher.rb +2 -0
- data/lib/sidekiq/logging.rb +2 -1
- data/lib/sidekiq/manager.rb +1 -0
- data/lib/sidekiq/middleware/chain.rb +1 -0
- data/lib/sidekiq/middleware/i18n.rb +1 -0
- data/lib/sidekiq/middleware/server/retry_jobs.rb +7 -7
- data/lib/sidekiq/paginator.rb +1 -0
- data/lib/sidekiq/processor.rb +1 -0
- data/lib/sidekiq/rails.rb +1 -0
- data/lib/sidekiq/redis_connection.rb +1 -0
- data/lib/sidekiq/scheduled.rb +1 -0
- data/lib/sidekiq/testing.rb +1 -0
- data/lib/sidekiq/testing/inline.rb +1 -0
- data/lib/sidekiq/util.rb +1 -0
- data/lib/sidekiq/version.rb +2 -1
- data/lib/sidekiq/web.rb +1 -0
- data/lib/sidekiq/web_helpers.rb +2 -1
- data/lib/sidekiq/worker.rb +1 -0
- data/test/fake_env.rb +1 -0
- data/test/helper.rb +1 -0
- data/test/test_actors.rb +1 -0
- data/test/test_api.rb +1 -0
- data/test/test_cli.rb +1 -0
- data/test/test_client.rb +30 -0
- data/test/test_exception_handler.rb +2 -1
- data/test/test_extensions.rb +1 -0
- data/test/test_fetch.rb +1 -0
- data/test/test_launcher.rb +5 -0
- data/test/test_logging.rb +1 -0
- data/test/test_manager.rb +1 -0
- data/test/test_middleware.rb +1 -0
- data/test/test_processor.rb +1 -0
- data/test/test_rails.rb +1 -0
- data/test/test_redis_connection.rb +1 -0
- data/test/test_retry.rb +1 -0
- data/test/test_scheduled.rb +1 -0
- data/test/test_scheduling.rb +1 -0
- data/test/test_sidekiq.rb +1 -0
- data/test/test_testing.rb +1 -0
- data/test/test_testing_fake.rb +1 -0
- data/test/test_testing_inline.rb +2 -1
- data/test/test_util.rb +1 -0
- data/test/test_web.rb +1 -0
- data/test/test_web_helpers.rb +1 -0
- data/web/locales/en.yml +1 -0
- data/web/locales/ru.yml +3 -0
- data/web/views/_nav.erb +1 -1
- data/web/views/busy.erb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a763f8ad28c68c25f87a3cd858b5aa7aafc692e7
|
4
|
+
data.tar.gz: ac87d118a8035ddce4515af0a73a67bb84ea684b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd5f4c504c85438366e296c17bb33faaa2b3e78dc484989fdb3b503f25de07e97fee9566154dbd8a6fa33373ce2d3536dc027f33e77527c42c39768dc3befebe
|
7
|
+
data.tar.gz: 47875b3a13a707f9fd7267ae8030353c425d46f2b4da82ec954cdc54020c2b3bd8e774bc463b63b8022149bd6249b17fe3dd217d85f3f51416ff71757fe9a3df
|
data/.travis.yml
CHANGED
data/COMM-LICENSE
CHANGED
@@ -28,7 +28,7 @@ In order to use the Software under this Agreement, you must receive a “Source
|
|
28
28
|
|
29
29
|
3.1 You shall not (and shall not allow any third party to): (a) decompile, disassemble, or otherwise reverse engineer the Software or attempt to reconstruct or discover any source code, underlying ideas, algorithms, file formats or programming interfaces of the Software by any means whatsoever (except and only to the extent that applicable law prohibits or restricts reverse engineering restrictions); (b) distribute, sell, sublicense, rent, lease or use the Software for time sharing, hosting, service provider or like purposes, except as expressly permitted under this Agreement; (c) redistribute the Software or Modifications other than by including the Software or a portion thereof within your own product, which must have substantially different functionality than the Software or Modifications and must not allow any third party to use the Software or Modifications, or any portions thereof, for software development or application development purposes; (d) redistribute the Software as part of a product, "appliance" or "virtual server"; (e) redistribute the Software on any server which is not directly under your control; (f) remove any product identification, proprietary, copyright or other notices contained in the Software; (g) modify any part of the Software, create a derivative work of any part of the Software (except as permitted in Section 4), or incorporate the Software, except to the extent expressly authorized in writing by Contributed Systems; (h) publicly disseminate performance information or analysis (including, without limitation, benchmarks) from any source relating to the Software; (i) utilize any equipment, device, software, or other means designed to circumvent or remove any form of Source URL or copy protection used by Contributed Systems in connection with the Software, or use the Software together with any authorization code, Source URL, serial number, or other copy protection device not supplied by Contributed Systems; (j) use the Software to develop a product which is competitive with any Contributed Systems product offerings; or (k) use unauthorized Source URLS or keycode(s) or distribute or publish Source URLs or keycode(s), except as may be expressly permitted by Contributed Systems in writing. If your unique Source URL is ever published, Contributed Systems reserves the right to terminate your access without notice.
|
30
30
|
|
31
|
-
3.2 UNDER NO CIRCUMSTANCES MAY YOU USE THE SOFTWARE
|
31
|
+
3.2 UNDER NO CIRCUMSTANCES MAY YOU USE THE SOFTWARE AS PART OF A PRODUCT OR SERVICE THAT PROVIDES SIMILAR FUNCTIONALITY TO THE SOFTWARE ITSELF.
|
32
32
|
|
33
33
|
The Open Source version of the Software (“LGPL Version”) is licensed
|
34
34
|
under the terms of the GNU Lesser General Public License versions 3.0
|
data/Changes.md
CHANGED
data/Ent-Changes.md
CHANGED
@@ -3,6 +3,12 @@ Sidekiq Enterprise Changelog
|
|
3
3
|
|
4
4
|
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
5
5
|
|
6
|
+
HEAD
|
7
|
+
-------------
|
8
|
+
|
9
|
+
- Add API to check if a unique lock is present. See [#2932] for details.
|
10
|
+
- Tune concurrent limiters to minimize thread thrashing under heavy contention. [#2944]
|
11
|
+
|
6
12
|
1.2.1
|
7
13
|
-------------
|
8
14
|
|
data/Gemfile
CHANGED
data/Pro-3.0-Upgrade.md
CHANGED
@@ -17,17 +17,15 @@ Sidekiq Pro 3.0 is designed to work with Sidekiq 4.0.
|
|
17
17
|
* Reliable fetch has been re-implemented due to the fetch changes in
|
18
18
|
Sidekiq 4.0.
|
19
19
|
|
20
|
-
* Support for platforms without persistent hostnames. Since reliable
|
21
|
-
|
22
|
-
|
20
|
+
* Support for platforms without persistent hostnames. Since the reliable\_fetch
|
21
|
+
algorithm requires a persistent hostname, an alternative reliability
|
22
|
+
algorithm is now available for platforms like Heroku and Docker:
|
23
23
|
```ruby
|
24
24
|
Sidekiq.configure_server do |config|
|
25
|
-
config.
|
26
|
-
config.reliable_fetch!
|
25
|
+
config.timed_fetch!
|
27
26
|
end
|
28
27
|
```
|
29
|
-
|
30
|
-
Without a persistent hostname, each Sidekiq process **must** have its own unique index.
|
28
|
+
The wiki contains [much more detail about each reliability option](https://github.com/mperham/sidekiq/wiki/Pro-Reliability-Server).
|
31
29
|
|
32
30
|
* The old 'sidekiq/notifications' features have been removed.
|
33
31
|
|
data/Pro-Changes.md
CHANGED
@@ -3,6 +3,41 @@ Sidekiq Pro Changelog
|
|
3
3
|
|
4
4
|
Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
|
5
5
|
|
6
|
+
3.2.1
|
7
|
+
---------
|
8
|
+
|
9
|
+
- timed\_fetch now works with namespaces. [ryansch]
|
10
|
+
|
11
|
+
|
12
|
+
3.2.0
|
13
|
+
---------
|
14
|
+
|
15
|
+
- Fixed detection of missing batches, `NoSuchBatch` should be raised
|
16
|
+
properly now if `Sidekiq::Batch.new(bid)` is called on a batch no
|
17
|
+
longer in Redis.
|
18
|
+
- Remove support for Pro 1.x format batches. This version will no
|
19
|
+
longer seamlessly process batches created with Sidekiq Pro 1.x.
|
20
|
+
As always, upgrade one major version at a time to ensure a smooth
|
21
|
+
transition.
|
22
|
+
- Fix edge case where a parent batch could expire before a child batch
|
23
|
+
was finished processing, leading to missing batches [#2889]
|
24
|
+
|
25
|
+
2.1.5
|
26
|
+
---------
|
27
|
+
|
28
|
+
- Fix edge case where a parent batch could expire before a child batch
|
29
|
+
was finished processing, leading to missing batches [#2889]
|
30
|
+
|
31
|
+
3.1.0
|
32
|
+
---------
|
33
|
+
|
34
|
+
- New container-friendly fetch algorithm: `timed_fetch`. See the
|
35
|
+
[wiki documentation](https://github.com/mperham/sidekiq/wiki/Pro-Reliability-Server)
|
36
|
+
for trade offs between the two reliability options. You should
|
37
|
+
use this if you are on Heroku, Docker, Amazon ECS or EBS or
|
38
|
+
another container-based system.
|
39
|
+
|
40
|
+
|
6
41
|
3.0.6
|
7
42
|
---------
|
8
43
|
|
data/README.md
CHANGED
@@ -18,7 +18,8 @@ message format as Resque so it can integrate into an existing Resque processing
|
|
18
18
|
You can have Sidekiq and Resque run side-by-side at the same time and
|
19
19
|
use the Resque client to enqueue jobs in Redis to be processed by Sidekiq.
|
20
20
|
|
21
|
-
|
21
|
+
Performance
|
22
|
+
---------------
|
22
23
|
|
23
24
|
Version | Latency | Garbage created for 10,000 jobs | Time to process 100,000 jobs | Throughput
|
24
25
|
-----------------|------|---------|---------|------------------------
|
data/bin/sidekiqload
CHANGED
@@ -26,8 +26,8 @@ Toxiproxy.populate([{
|
|
26
26
|
|
27
27
|
|
28
28
|
Sidekiq.configure_server do |config|
|
29
|
-
config.
|
30
|
-
|
29
|
+
#config.options[:concurrency] = 1
|
30
|
+
config.redis = { driver: :hiredis, db: 13, port: 6380 }
|
31
31
|
config.options[:queues] << 'default'
|
32
32
|
config.logger.level = Logger::ERROR
|
33
33
|
config.average_scheduled_poll_interval = 2
|
data/lib/sidekiq.rb
CHANGED
data/lib/sidekiq/api.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# encoding: utf-8
|
2
3
|
require 'sidekiq'
|
3
4
|
|
@@ -195,7 +196,7 @@ module Sidekiq
|
|
195
196
|
# Return all known queues within Redis.
|
196
197
|
#
|
197
198
|
def self.all
|
198
|
-
Sidekiq.redis {|c| c.smembers('queues'.freeze) }.sort.map {|q| Sidekiq::Queue.new(q) }
|
199
|
+
Sidekiq.redis { |c| c.smembers('queues'.freeze) }.sort.map { |q| Sidekiq::Queue.new(q) }
|
199
200
|
end
|
200
201
|
|
201
202
|
attr_reader :name
|
@@ -277,6 +278,7 @@ module Sidekiq
|
|
277
278
|
#
|
278
279
|
class Job
|
279
280
|
attr_reader :item
|
281
|
+
attr_reader :value
|
280
282
|
|
281
283
|
def initialize(item, queue_name=nil)
|
282
284
|
@value = item
|
data/lib/sidekiq/cli.rb
CHANGED
data/lib/sidekiq/client.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'securerandom'
|
2
3
|
require 'sidekiq/middleware/chain'
|
3
4
|
|
@@ -82,10 +83,14 @@ module Sidekiq
|
|
82
83
|
# Returns an array of the of pushed jobs' jids. The number of jobs pushed can be less
|
83
84
|
# than the number given if the middleware stopped processing for one or more jobs.
|
84
85
|
def push_bulk(items)
|
86
|
+
arg = items['args'].first
|
87
|
+
raise ArgumentError, "Bulk arguments must be an Array of Arrays: [[1], [2]]" if !arg.is_a?(Array)
|
88
|
+
|
85
89
|
normed = normalize_item(items)
|
86
90
|
payloads = items['args'].map do |args|
|
87
|
-
|
88
|
-
process_single(items['class'],
|
91
|
+
copy = normed.merge('args' => args, 'jid' => SecureRandom.hex(12), 'enqueued_at' => Time.now.to_f)
|
92
|
+
result = process_single(items['class'], copy)
|
93
|
+
result ? result : nil
|
89
94
|
end.compact
|
90
95
|
|
91
96
|
raw_push(payloads) if !payloads.empty?
|
@@ -106,7 +111,8 @@ module Sidekiq
|
|
106
111
|
# you cannot scale any other way (e.g. splitting your app into smaller apps).
|
107
112
|
def self.via(pool)
|
108
113
|
raise ArgumentError, "No pool given" if pool.nil?
|
109
|
-
|
114
|
+
current_sidekiq_pool = Thread.current[:sidekiq_via_pool]
|
115
|
+
raise RuntimeError, "Sidekiq::Client.via is not re-entrant" if current_sidekiq_pool && current_sidekiq_pool != pool
|
110
116
|
Thread.current[:sidekiq_via_pool] = pool
|
111
117
|
yield
|
112
118
|
ensure
|
@@ -205,6 +211,7 @@ module Sidekiq
|
|
205
211
|
raise(ArgumentError, "Job must be a Hash with 'class' and 'args' keys: { 'class' => SomeWorker, 'args' => ['bob', 1, :foo => 'bar'] }") unless item.is_a?(Hash) && item.has_key?('class'.freeze) && item.has_key?('args'.freeze)
|
206
212
|
raise(ArgumentError, "Job args must be an Array") unless item['args'].is_a?(Array)
|
207
213
|
raise(ArgumentError, "Job class must be either a Class or String representation of the class name") unless item['class'.freeze].is_a?(Class) || item['class'.freeze].is_a?(String)
|
214
|
+
#raise(ArgumentError, "Arguments must be native JSON types, see https://github.com/mperham/sidekiq/wiki/Best-Practices") unless JSON.load(JSON.dump(item['args'])) == item['args']
|
208
215
|
|
209
216
|
normalized_hash(item['class'.freeze])
|
210
217
|
.each{ |key, value| item[key] = value if item[key].nil? }
|
data/lib/sidekiq/core_ext.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'sidekiq'
|
2
3
|
|
3
4
|
module Sidekiq
|
@@ -5,7 +6,7 @@ module Sidekiq
|
|
5
6
|
|
6
7
|
class Logger
|
7
8
|
def call(ex, ctxHash)
|
8
|
-
Sidekiq.logger.warn(ctxHash) if !ctxHash.empty?
|
9
|
+
Sidekiq.logger.warn(Sidekiq.dump_json(ctxHash)) if !ctxHash.empty?
|
9
10
|
Sidekiq.logger.warn "#{ex.class.name}: #{ex.message}"
|
10
11
|
Sidekiq.logger.warn ex.backtrace.join("\n") unless ex.backtrace.nil?
|
11
12
|
end
|
data/lib/sidekiq/fetch.rb
CHANGED
data/lib/sidekiq/launcher.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# encoding: utf-8
|
2
3
|
require 'sidekiq/manager'
|
3
4
|
require 'sidekiq/fetch'
|
@@ -88,6 +89,7 @@ module Sidekiq
|
|
88
89
|
Processor::WORKER_STATE.each_pair do |tid, hash|
|
89
90
|
conn.hset(workers_key, tid, Sidekiq.dump_json(hash))
|
90
91
|
end
|
92
|
+
conn.expire(workers_key, 60)
|
91
93
|
end
|
92
94
|
end
|
93
95
|
fails = procd = 0
|
data/lib/sidekiq/logging.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'time'
|
2
3
|
require 'logger'
|
3
4
|
require 'fcntl'
|
@@ -47,7 +48,7 @@ module Sidekiq
|
|
47
48
|
end
|
48
49
|
|
49
50
|
def self.logger=(log)
|
50
|
-
@logger = (log ? log : Logger.new(
|
51
|
+
@logger = (log ? log : Logger.new(File::NULL))
|
51
52
|
end
|
52
53
|
|
53
54
|
# This reopens ALL logfiles in the process that have been rotated
|
data/lib/sidekiq/manager.rb
CHANGED
@@ -8,14 +8,14 @@ module Sidekiq
|
|
8
8
|
# Automatically retry jobs that fail in Sidekiq.
|
9
9
|
# Sidekiq's retry support assumes a typical development lifecycle:
|
10
10
|
#
|
11
|
-
# 0.
|
12
|
-
# 1.
|
13
|
-
# the job and pushes it onto a retry queue
|
14
|
-
# 2.
|
15
|
-
# an exponential delay, the job continues to fail
|
16
|
-
# 3.
|
11
|
+
# 0. Push some code changes with a bug in it.
|
12
|
+
# 1. Bug causes job processing to fail, Sidekiq's middleware captures
|
13
|
+
# the job and pushes it onto a retry queue.
|
14
|
+
# 2. Sidekiq retries jobs in the retry queue multiple times with
|
15
|
+
# an exponential delay, the job continues to fail.
|
16
|
+
# 3. After a few days, a developer deploys a fix. The job is
|
17
17
|
# reprocessed successfully.
|
18
|
-
# 4.
|
18
|
+
# 4. Once retries are exhausted, Sidekiq will give up and move the
|
19
19
|
# job to the Dead Job Queue (aka morgue) where it must be dealt with
|
20
20
|
# manually in the Web UI.
|
21
21
|
# 5. After 6 months on the DJQ, Sidekiq will discard the job.
|
data/lib/sidekiq/paginator.rb
CHANGED
data/lib/sidekiq/processor.rb
CHANGED
data/lib/sidekiq/rails.rb
CHANGED
data/lib/sidekiq/scheduled.rb
CHANGED
data/lib/sidekiq/testing.rb
CHANGED
data/lib/sidekiq/util.rb
CHANGED
data/lib/sidekiq/version.rb
CHANGED
data/lib/sidekiq/web.rb
CHANGED
data/lib/sidekiq/web_helpers.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'uri'
|
2
3
|
|
3
4
|
module Sidekiq
|
@@ -166,7 +167,7 @@ module Sidekiq
|
|
166
167
|
|
167
168
|
def display_args(args, truncate_after_chars = 2000)
|
168
169
|
args.map do |arg|
|
169
|
-
h(truncate(to_display(arg)))
|
170
|
+
h(truncate(to_display(arg), truncate_after_chars))
|
170
171
|
end.join(", ")
|
171
172
|
end
|
172
173
|
|
data/lib/sidekiq/worker.rb
CHANGED
data/test/fake_env.rb
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
# frozen_string_literal: true
|
data/test/helper.rb
CHANGED
data/test/test_actors.rb
CHANGED
data/test/test_api.rb
CHANGED
data/test/test_cli.rb
CHANGED
data/test/test_client.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require_relative 'helper'
|
2
3
|
|
3
4
|
class TestClient < Sidekiq::Test
|
@@ -32,6 +33,23 @@ class TestClient < Sidekiq::Test
|
|
32
33
|
assert_equal 24, jid.size
|
33
34
|
end
|
34
35
|
|
36
|
+
it 'allows middleware to stop bulk jobs' do
|
37
|
+
mware = Class.new do
|
38
|
+
def call(worker_klass,msg,q,r)
|
39
|
+
msg['args'][0] == 1 ? yield : false
|
40
|
+
end
|
41
|
+
end
|
42
|
+
client = Sidekiq::Client.new
|
43
|
+
client.middleware do |chain|
|
44
|
+
chain.add mware
|
45
|
+
end
|
46
|
+
q = Sidekiq::Queue.new
|
47
|
+
q.clear
|
48
|
+
result = client.push_bulk('class' => 'Blah', 'args' => [[1],[2],[3]])
|
49
|
+
assert_equal 1, result.size
|
50
|
+
assert_equal 1, q.size
|
51
|
+
end
|
52
|
+
|
35
53
|
it 'allows local middleware modification' do
|
36
54
|
$called = false
|
37
55
|
mware = Class.new { def call(worker_klass,msg,q,r); $called = true; msg;end }
|
@@ -164,6 +182,18 @@ class TestClient < Sidekiq::Test
|
|
164
182
|
conn.verify
|
165
183
|
end
|
166
184
|
|
185
|
+
it 'allows #via to point to same Redi' do
|
186
|
+
conn = MiniTest::Mock.new
|
187
|
+
conn.expect(:multi, [0, 1])
|
188
|
+
sharded_pool = ConnectionPool.new(size: 1) { conn }
|
189
|
+
Sidekiq::Client.via(sharded_pool) do
|
190
|
+
Sidekiq::Client.via(sharded_pool) do
|
191
|
+
CWorker.perform_async(1,2,3)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
conn.verify
|
195
|
+
end
|
196
|
+
|
167
197
|
it 'allows #via to point to different Redi' do
|
168
198
|
conn = MiniTest::Mock.new
|
169
199
|
conn.expect(:multi, [0, 1])
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require_relative 'helper'
|
2
3
|
require 'sidekiq/exception_handler'
|
3
4
|
require 'stringio'
|
@@ -32,7 +33,7 @@ class TestExceptionHandler < Sidekiq::Test
|
|
32
33
|
Component.new.invoke_exception(:a => 1)
|
33
34
|
@str_logger.rewind
|
34
35
|
log = @str_logger.readlines
|
35
|
-
assert_match(/a
|
36
|
+
assert_match(/"a":1/, log[0], "didn't include the context")
|
36
37
|
assert_match(/Something didn't work!/, log[1], "didn't include the exception message")
|
37
38
|
assert_match(/test\/test_exception_handler.rb/, log[2], "didn't include the backtrace")
|
38
39
|
end
|
data/test/test_extensions.rb
CHANGED
data/test/test_fetch.rb
CHANGED
data/test/test_launcher.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require_relative 'helper'
|
2
3
|
require 'sidekiq/launcher'
|
3
4
|
|
@@ -55,6 +56,10 @@ class TestLauncher < Sidekiq::Test
|
|
55
56
|
@launcher.heartbeat('identity', heartbeat_data, Sidekiq.dump_json(heartbeat_data))
|
56
57
|
end
|
57
58
|
|
59
|
+
#after do
|
60
|
+
#puts system('redis-cli -n 15 keys "*" | while read LINE ; do TTL=`redis-cli -n 15 ttl "$LINE"`; if [ "$TTL" -eq -1 ]; then echo "$LINE"; fi; done;')
|
61
|
+
#end
|
62
|
+
|
58
63
|
it 'indicates stopping status in proctitle' do
|
59
64
|
assert_equal "sidekiq #{Sidekiq::VERSION} myapp [1 of 3 busy] stopping", $0
|
60
65
|
end
|
data/test/test_logging.rb
CHANGED
data/test/test_manager.rb
CHANGED
data/test/test_middleware.rb
CHANGED
data/test/test_processor.rb
CHANGED
data/test/test_rails.rb
CHANGED
data/test/test_retry.rb
CHANGED
data/test/test_scheduled.rb
CHANGED
data/test/test_scheduling.rb
CHANGED
data/test/test_sidekiq.rb
CHANGED
data/test/test_testing.rb
CHANGED
data/test/test_testing_fake.rb
CHANGED
data/test/test_testing_inline.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require_relative 'helper'
|
2
3
|
|
3
4
|
require 'active_record'
|
@@ -86,7 +87,7 @@ class TestInline < Sidekiq::Test
|
|
86
87
|
end
|
87
88
|
|
88
89
|
it 'should relay parameters through json' do
|
89
|
-
assert Sidekiq::Client.enqueue(InlineWorkerWithTimeParam, Time.now)
|
90
|
+
assert Sidekiq::Client.enqueue(InlineWorkerWithTimeParam, Time.now.to_f)
|
90
91
|
end
|
91
92
|
|
92
93
|
end
|
data/test/test_util.rb
CHANGED
data/test/test_web.rb
CHANGED
data/test/test_web_helpers.rb
CHANGED
data/web/locales/en.yml
CHANGED
data/web/locales/ru.yml
CHANGED
data/web/views/_nav.erb
CHANGED
@@ -56,7 +56,7 @@
|
|
56
56
|
<div class="poll-wrapper pull-right">
|
57
57
|
<%= erb :_poll_link %>
|
58
58
|
<% if Sidekiq::Web.app_url %>
|
59
|
-
<a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>"
|
59
|
+
<a class="btn btn-inverse" href="<%= Sidekiq::Web.app_url %>"><%= t('BackToApp') %></a>
|
60
60
|
<% end %>
|
61
61
|
</div>
|
62
62
|
</li>
|
data/web/views/busy.erb
CHANGED
@@ -6,8 +6,8 @@
|
|
6
6
|
<form method="POST" style="margin-top: 20px; margin-bottom: 10px;">
|
7
7
|
<%= csrf_tag %>
|
8
8
|
<div class="btn-group pull-right">
|
9
|
-
<button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('QuietAll') %></button>
|
10
|
-
<button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('StopAll') %></button>
|
9
|
+
<button class="btn btn-warn" type="submit" name="quiet" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('QuietAll') %></button>
|
10
|
+
<button class="btn btn-danger" type="submit" name="stop" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('StopAll') %></button>
|
11
11
|
</div>
|
12
12
|
</form>
|
13
13
|
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.1.
|
4
|
+
version: 4.1.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: 2016-
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -404,3 +404,4 @@ test_files:
|
|
404
404
|
- test/test_util.rb
|
405
405
|
- test/test_web.rb
|
406
406
|
- test/test_web_helpers.rb
|
407
|
+
has_rdoc:
|