sidekiq 6.0.0 → 6.0.7

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.

Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +0 -1
  3. data/6.0-Upgrade.md +3 -1
  4. data/Changes.md +131 -1
  5. data/Ent-Changes.md +7 -1
  6. data/Gemfile +1 -1
  7. data/Gemfile.lock +106 -94
  8. data/Pro-Changes.md +16 -2
  9. data/README.md +3 -1
  10. data/bin/sidekiq +19 -0
  11. data/bin/sidekiqload +8 -4
  12. data/bin/sidekiqmon +4 -5
  13. data/lib/generators/sidekiq/worker_generator.rb +11 -1
  14. data/lib/sidekiq/api.rb +125 -92
  15. data/lib/sidekiq/cli.rb +33 -20
  16. data/lib/sidekiq/client.rb +20 -4
  17. data/lib/sidekiq/fetch.rb +7 -7
  18. data/lib/sidekiq/job_logger.rb +12 -4
  19. data/lib/sidekiq/job_retry.rb +23 -10
  20. data/lib/sidekiq/launcher.rb +32 -8
  21. data/lib/sidekiq/logger.rb +108 -12
  22. data/lib/sidekiq/middleware/chain.rb +11 -2
  23. data/lib/sidekiq/monitor.rb +3 -18
  24. data/lib/sidekiq/paginator.rb +7 -2
  25. data/lib/sidekiq/processor.rb +18 -20
  26. data/lib/sidekiq/redis_connection.rb +9 -4
  27. data/lib/sidekiq/scheduled.rb +13 -12
  28. data/lib/sidekiq/sd_notify.rb +149 -0
  29. data/lib/sidekiq/systemd.rb +24 -0
  30. data/lib/sidekiq/testing.rb +12 -0
  31. data/lib/sidekiq/util.rb +0 -2
  32. data/lib/sidekiq/version.rb +1 -1
  33. data/lib/sidekiq/web/application.rb +22 -21
  34. data/lib/sidekiq/web/helpers.rb +23 -11
  35. data/lib/sidekiq/web/router.rb +1 -3
  36. data/lib/sidekiq/web.rb +1 -1
  37. data/lib/sidekiq/worker.rb +6 -6
  38. data/lib/sidekiq.rb +17 -5
  39. data/sidekiq.gemspec +2 -2
  40. data/web/assets/javascripts/application.js +22 -19
  41. data/web/assets/javascripts/dashboard.js +2 -2
  42. data/web/assets/stylesheets/application-dark.css +122 -0
  43. data/web/assets/stylesheets/application.css +9 -0
  44. data/web/locales/de.yml +14 -2
  45. data/web/locales/en.yml +2 -0
  46. data/web/locales/fr.yml +2 -2
  47. data/web/locales/ja.yml +2 -0
  48. data/web/locales/lt.yml +83 -0
  49. data/web/locales/vi.yml +83 -0
  50. data/web/views/_job_info.erb +2 -1
  51. data/web/views/busy.erb +4 -1
  52. data/web/views/dead.erb +2 -2
  53. data/web/views/layout.erb +1 -0
  54. data/web/views/morgue.erb +4 -1
  55. data/web/views/queue.erb +10 -1
  56. data/web/views/queues.erb +8 -0
  57. data/web/views/retries.erb +4 -1
  58. data/web/views/retry.erb +2 -2
  59. data/web/views/scheduled.erb +4 -1
  60. metadata +13 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fda3ed37e1d981e1b32eea70669c678d400c071a9146a919848bcc598612de25
4
- data.tar.gz: 6580ab6c188b2514efe807479ca25c06ea584d1def175d84d94639bc20f80b1e
3
+ metadata.gz: 3dd5d7a0dd8a7d877484df4ae3b9988f15e9cc4bc0bb4da23224be0049fa733e
4
+ data.tar.gz: e2b7ddb4c045817837e996356851648bf32108b37fa1abcfb72795a185b4a238
5
5
  SHA512:
6
- metadata.gz: 25682d3dbf99d29fa3f56b7c74419863d3549b6e0c182e69c83fbc02a2955d053bca85eec53b474d4d22c7526e44e865f378aa4111152a91377b373be27c4d47
7
- data.tar.gz: e55d07434b1e2ab26df6748101bf10640fc08d4d93f00b75ed04d82ed309ee8529d652982430cd00671c98b5e53cc733bef4b686df58a6b0e116ba04c12139aa
6
+ metadata.gz: 5ce3f911b835b38ce212309bcdf81b4789e24a12898a0f2071b9adb9cbcdfa23a33bb7216c2f7c6dcab26d484f79a1271594d3218f63ed041f0027deab5a26f3
7
+ data.tar.gz: 685a6890a43c990b2fd9709c49f9c82c96a487cdcf6fc0607ab15b9dbb47d52c9f797ec5094d3f92ec35c5737e661f966a6b81006ee4b7d99a7f31285180b3db
data/.circleci/config.yml CHANGED
@@ -58,4 +58,3 @@ workflows:
58
58
  jobs:
59
59
  - "ruby-2.5"
60
60
  - "ruby-2.6"
61
- - "jruby"
data/6.0-Upgrade.md CHANGED
@@ -10,6 +10,7 @@ This release has major breaking changes. Read and test carefully in production.
10
10
  - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
11
  features/internals like the retry subsystem. Prefer the native
12
12
  Sidekiq::Worker APIs as some Sidekiq features (e.g. unique jobs) do not work well with AJ.
13
+ (requires Rails 6.0.2)
13
14
  ```ruby
14
15
  class MyJob < ActiveJob::Base
15
16
  queue_as :myqueue
@@ -31,9 +32,10 @@ you can override it by configuring the log formatter explicitly. See
31
32
  ```ruby
32
33
  Sidekiq.configure_server do |config|
33
34
  config.log_formatter = AcmeCorp::PlainLogFormatter.new
34
- # config.log_formatter = Sidekiq::Logger::Format::JSON.new
35
+ # config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
35
36
  end
36
37
  ```
38
+ Please see the [Logging](https://github.com/mperham/sidekiq/wiki/Logging) wiki page for the latest documentation and notes.
37
39
  - **Remove the daemonization, logfile and pidfile command line arguments and `sidekiqctl` binary**.
38
40
  I've [noted for years](https://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/)
39
41
  how modern services should be managed with a proper init system.
data/Changes.md CHANGED
@@ -2,12 +2,129 @@
2
2
 
3
3
  [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
4
4
 
5
+ 6.0.7
6
+ ---------
7
+
8
+ - Refactor systemd integration to work better with custom binaries [#4511]
9
+ - Don't connect to Redis at process exit if not needed [#4502]
10
+ - Remove Redis connection naming [#4479]
11
+ - Fix Redis Sentinel password redaction [#4499]
12
+ - Add Vietnamese locale (vi) [#4528]
13
+
14
+ 6.0.6
15
+ ---------
16
+
17
+ - **Integrate with systemd's watchdog and notification features** [#4488]
18
+ Set `Type=notify` in [sidekiq.service](https://github.com/mperham/sidekiq/blob/4b8a8bd3ae42f6e48ae1fdaf95ed7d7af18ed8bb/examples/systemd/sidekiq.service#L30-L39). The integration works automatically.
19
+ - Use `setTimeout` rather than `setInterval` to avoid thundering herd [#4480]
20
+ - Fix edge case where a job can be pushed without a queue.
21
+ - Flush job stats at exit [#4498]
22
+ - Check RAILS_ENV before RACK_ENV [#4493]
23
+ - Add Lithuanian locale [#4476]
24
+
25
+ 6.0.5
26
+ ---------
27
+
28
+ - Fix broken Web UI response when using NewRelic and Rack 2.1.2+. [#4440]
29
+ - Update APIs to use `UNLINK`, not `DEL`. [#4449]
30
+ - Fix Ruby 2.7 warnings [#4412]
31
+ - Add support for `APP_ENV` [[95fa5d9]](https://github.com/mperham/sidekiq/commit/95fa5d90192148026e52ca2902f1b83c70858ce8)
32
+
33
+ 6.0.4
34
+ ---------
35
+
36
+ - Fix ActiveJob's `sidekiq_options` integration [#4404]
37
+ - Sidekiq Pro users will now see a Pause button next to each queue in
38
+ the Web UI, allowing them to pause queues manually [#4374, shayonj]
39
+ - Fix Sidekiq::Workers API unintentional change in 6.0.2 [#4387]
40
+
41
+
42
+ 6.0.3
43
+ ---------
44
+
45
+ - Fix `Sidekiq::Client.push_bulk` API which was erroneously putting
46
+ invalid `at` values in the job payloads [#4321]
47
+
48
+ 6.0.2
49
+ ---------
50
+
51
+ - Fix Sidekiq Enterprise's rolling restart functionality, broken by refactoring in 6.0.0. [#4334]
52
+ - More internal refactoring and performance tuning [fatkodima]
53
+
54
+ 6.0.1
55
+ ---------
56
+
57
+ - **Performance tuning**, Sidekiq should be 10-15% faster now [#4303, 4299,
58
+ 4269, fatkodima]
59
+ - **Dark Mode support in Web UI** (further design polish welcome!) [#4227, mperham,
60
+ fatkodima, silent-e]
61
+ - **Job-specific log levels**, allowing you to turn on debugging for
62
+ problematic workers. [fatkodima, #4287]
63
+ ```ruby
64
+ MyWorker.set(log_level: :debug).perform_async(...)
65
+ ```
66
+ - **Ad-hoc job tags**. You can tag your jobs with, e.g, subdomain, tenant, country,
67
+ locale, application, version, user/client, "alpha/beta/pro/ent", types of jobs,
68
+ teams/people responsible for jobs, additional metadata, etc.
69
+ Tags are shown on different pages with job listings. Sidekiq Pro users
70
+ can filter based on them [fatkodima, #4280]
71
+ ```ruby
72
+ class MyWorker
73
+ include Sidekiq::Worker
74
+ sidekiq_options tags: ['bank-ops', 'alpha']
75
+ ...
76
+ end
77
+ ```
78
+ - Fetch scheduled jobs in batches before pushing into specific queues.
79
+ This will decrease enqueueing time of scheduled jobs by a third. [fatkodima, #4273]
80
+ ```
81
+ ScheduledSet with 10,000 jobs
82
+ Before: 56.6 seconds
83
+ After: 39.2 seconds
84
+ ```
85
+ - Compress error backtraces before pushing into Redis, if you are
86
+ storing error backtraces, this will halve the size of your RetrySet
87
+ in Redis [fatkodima, #4272]
88
+ ```
89
+ RetrySet with 100,000 jobs
90
+ Before: 261 MB
91
+ After: 129 MB
92
+ ```
93
+ - Support display of ActiveJob 6.0 payloads in the Web UI [#4263]
94
+ - Add `SortedSet#scan` for pattern based scanning. For large sets this API will be **MUCH** faster
95
+ than standard iteration using each. [fatkodima, #4262]
96
+ ```ruby
97
+ Sidekiq::DeadSet.new.scan("UnreliableApi") do |job|
98
+ job.retry
99
+ end
100
+ ```
101
+ - Dramatically speed up SortedSet#find\_job(jid) by using Redis's ZSCAN
102
+ support, approx 10x faster. [fatkodima, #4259]
103
+ ```
104
+ zscan 0.179366 0.047727 0.227093 ( 1.161376)
105
+ enum 8.522311 0.419826 8.942137 ( 9.785079)
106
+ ```
107
+ - Respect rails' generators `test_framework` option and gracefully handle extra `worker` suffix on generator [fatkodima, #4256]
108
+ - Add ability to sort 'Enqueued' page on Web UI by position in the queue [fatkodima, #4248]
109
+ - Support `Client.push_bulk` with different delays [fatkodima, #4243]
110
+ ```ruby
111
+ Sidekiq::Client.push_bulk("class" => FooJob, "args" => [[1], [2]], "at" => [1.minute.from_now.to_f, 5.minutes.from_now.to_f])
112
+ ```
113
+ - Easier way to test enqueuing specific ActionMailer and ActiveRecord delayed jobs. Instead of manually
114
+ parsing embedded class, you can now test by fetching jobs for specific classes. [fatkodima, #4292]
115
+ ```ruby
116
+ assert_equal 1, Sidekiq::Extensions::DelayedMailer.jobs_for(FooMailer).size
117
+ ```
118
+ - Add `sidekiqmon` to gemspec executables [#4242]
119
+ - Gracefully handle `Sidekiq.logger = nil` [#4240]
120
+ - Inject Sidekiq::LogContext module if user-supplied logger does not include it [#4239]
121
+
5
122
  6.0
6
123
  ---------
7
124
 
8
125
  This release has major breaking changes. Read and test carefully in production.
9
126
 
10
- - ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
127
+ - With Rails 6.0.1+, ActiveJobs can now use `sidekiq_options` directly to configure Sidekiq
11
128
  features/internals like the retry subsystem. [#4213, pirj]
12
129
  ```ruby
13
130
  class MyJob < ActiveJob::Base
@@ -17,6 +134,13 @@ class MyJob < ActiveJob::Base
17
134
  end
18
135
  end
19
136
  ```
137
+ - Logging has been redesigned to allow for pluggable log formatters:
138
+ ```ruby
139
+ Sidekiq.configure_server do |config|
140
+ config.log_formatter = Sidekiq::Logger::Formatters::JSON.new
141
+ end
142
+ ```
143
+ See the [Logging wiki page](https://github.com/mperham/sidekiq/wiki/Logging) for more details.
20
144
  - **BREAKING CHANGE** Validate proper usage of the `REDIS_PROVIDER`
21
145
  variable. This variable is meant to hold the name of the environment
22
146
  variable which contains your Redis URL, so that you can switch Redis
@@ -36,6 +160,12 @@ end
36
160
  - Integrate the StandardRB code formatter to ensure consistent code
37
161
  styling. [#4114, gearnode]
38
162
 
163
+ 5.2.8
164
+ ---------
165
+
166
+ - Lock to Rack 2.0.x to prevent future incompatibilities
167
+ - Fix invalid reference in `sidekiqctl`
168
+
39
169
  5.2.7
40
170
  ---------
41
171
 
data/Ent-Changes.md CHANGED
@@ -4,10 +4,16 @@
4
4
 
5
5
  Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
6
6
 
7
+ 2.0.1
8
+ -------------
9
+
10
+ - Periodic job registration API adjusted to avoid loading classes in initializer [#4271]
11
+ - Remove support for deprecated ENV variables (COUNT, MAXMEM\_MB, INDEX) in swarm code
12
+
7
13
  2.0.0
8
14
  -------------
9
15
 
10
- - Except for the [newly required credentials](/mperham/sidekiq/issue/4232), Sidekiq Enterprise 2.0 does
16
+ - Except for the [newly required credentials](https://github.com/mperham/sidekiq/issues/4232), Sidekiq Enterprise 2.0 does
11
17
  not have any significant migration steps.
12
18
  - Sidekiq Enterprise must now be started with valid license credentials. [#4232]
13
19
  - Call `GC.compact` if possible in sidekiqswarm before forking [#4181]
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ gemspec
4
4
 
5
5
  gem "rake"
6
6
  gem "redis-namespace"
7
- gem "rails"
7
+ gem "rails", ">= 6.0.2"
8
8
  gem "sqlite3", platforms: :ruby
9
9
  gem "activerecord-jdbcsqlite3-adapter", platforms: :jruby
10
10
 
data/Gemfile.lock CHANGED
@@ -1,87 +1,94 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sidekiq (6.0.0)
4
+ sidekiq (6.0.7)
5
5
  connection_pool (>= 2.2.2)
6
- rack (>= 2.0.0)
6
+ rack (~> 2.0)
7
7
  rack-protection (>= 2.0.0)
8
8
  redis (>= 4.1.0)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (6.0.0)
14
- actionpack (= 6.0.0)
13
+ actioncable (6.0.2.1)
14
+ actionpack (= 6.0.2.1)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.0.0)
18
- actionpack (= 6.0.0)
19
- activejob (= 6.0.0)
20
- activerecord (= 6.0.0)
21
- activestorage (= 6.0.0)
22
- activesupport (= 6.0.0)
17
+ actionmailbox (6.0.2.1)
18
+ actionpack (= 6.0.2.1)
19
+ activejob (= 6.0.2.1)
20
+ activerecord (= 6.0.2.1)
21
+ activestorage (= 6.0.2.1)
22
+ activesupport (= 6.0.2.1)
23
23
  mail (>= 2.7.1)
24
- actionmailer (6.0.0)
25
- actionpack (= 6.0.0)
26
- actionview (= 6.0.0)
27
- activejob (= 6.0.0)
24
+ actionmailer (6.0.2.1)
25
+ actionpack (= 6.0.2.1)
26
+ actionview (= 6.0.2.1)
27
+ activejob (= 6.0.2.1)
28
28
  mail (~> 2.5, >= 2.5.4)
29
29
  rails-dom-testing (~> 2.0)
30
- actionpack (6.0.0)
31
- actionview (= 6.0.0)
32
- activesupport (= 6.0.0)
33
- rack (~> 2.0)
30
+ actionpack (6.0.2.1)
31
+ actionview (= 6.0.2.1)
32
+ activesupport (= 6.0.2.1)
33
+ rack (~> 2.0, >= 2.0.8)
34
34
  rack-test (>= 0.6.3)
35
35
  rails-dom-testing (~> 2.0)
36
36
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
37
- actiontext (6.0.0)
38
- actionpack (= 6.0.0)
39
- activerecord (= 6.0.0)
40
- activestorage (= 6.0.0)
41
- activesupport (= 6.0.0)
37
+ actiontext (6.0.2.1)
38
+ actionpack (= 6.0.2.1)
39
+ activerecord (= 6.0.2.1)
40
+ activestorage (= 6.0.2.1)
41
+ activesupport (= 6.0.2.1)
42
42
  nokogiri (>= 1.8.5)
43
- actionview (6.0.0)
44
- activesupport (= 6.0.0)
43
+ actionview (6.0.2.1)
44
+ activesupport (= 6.0.2.1)
45
45
  builder (~> 3.1)
46
46
  erubi (~> 1.4)
47
47
  rails-dom-testing (~> 2.0)
48
48
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
49
- activejob (6.0.0)
50
- activesupport (= 6.0.0)
49
+ activejob (6.0.2.1)
50
+ activesupport (= 6.0.2.1)
51
51
  globalid (>= 0.3.6)
52
- activemodel (6.0.0)
53
- activesupport (= 6.0.0)
54
- activerecord (6.0.0)
55
- activemodel (= 6.0.0)
56
- activesupport (= 6.0.0)
57
- activestorage (6.0.0)
58
- actionpack (= 6.0.0)
59
- activejob (= 6.0.0)
60
- activerecord (= 6.0.0)
52
+ activemodel (6.0.2.1)
53
+ activesupport (= 6.0.2.1)
54
+ activerecord (6.0.2.1)
55
+ activemodel (= 6.0.2.1)
56
+ activesupport (= 6.0.2.1)
57
+ activerecord-jdbc-adapter (60.1-java)
58
+ activerecord (~> 6.0.0)
59
+ activerecord-jdbcsqlite3-adapter (60.1-java)
60
+ activerecord-jdbc-adapter (= 60.1)
61
+ jdbc-sqlite3 (~> 3.8, < 3.30)
62
+ activestorage (6.0.2.1)
63
+ actionpack (= 6.0.2.1)
64
+ activejob (= 6.0.2.1)
65
+ activerecord (= 6.0.2.1)
61
66
  marcel (~> 0.3.1)
62
- activesupport (6.0.0)
67
+ activesupport (6.0.2.1)
63
68
  concurrent-ruby (~> 1.0, >= 1.0.2)
64
69
  i18n (>= 0.7, < 2)
65
70
  minitest (~> 5.1)
66
71
  tzinfo (~> 1.1)
67
- zeitwerk (~> 2.1, >= 2.1.8)
72
+ zeitwerk (~> 2.2)
68
73
  ast (2.4.0)
69
- builder (3.2.3)
70
- byebug (11.0.1)
74
+ builder (3.2.4)
75
+ byebug (11.1.1)
71
76
  coderay (1.1.2)
72
- concurrent-ruby (1.1.5)
77
+ concurrent-ruby (1.1.6)
73
78
  connection_pool (2.2.2)
74
- crass (1.0.4)
79
+ crass (1.0.6)
75
80
  docile (1.3.2)
76
- erubi (1.8.0)
81
+ erubi (1.9.0)
77
82
  globalid (0.4.2)
78
83
  activesupport (>= 4.2.0)
79
84
  hiredis (0.6.3)
80
- i18n (1.6.0)
85
+ hiredis (0.6.3-java)
86
+ i18n (1.8.2)
81
87
  concurrent-ruby (~> 1.0)
82
- jaro_winkler (1.5.3)
83
- json (2.2.0)
84
- loofah (2.2.3)
88
+ jaro_winkler (1.5.4)
89
+ jaro_winkler (1.5.4-java)
90
+ jdbc-sqlite3 (3.28.0)
91
+ loofah (2.4.0)
85
92
  crass (~> 1.0.2)
86
93
  nokogiri (>= 1.5.9)
87
94
  mail (2.7.1)
@@ -89,96 +96,101 @@ GEM
89
96
  marcel (0.3.3)
90
97
  mimemagic (~> 0.3.2)
91
98
  method_source (0.9.2)
92
- mimemagic (0.3.3)
99
+ mimemagic (0.3.4)
93
100
  mini_mime (1.0.2)
94
101
  mini_portile2 (2.4.0)
95
- minitest (5.11.3)
96
- nio4r (2.5.1)
97
- nokogiri (1.10.4)
102
+ minitest (5.14.0)
103
+ nio4r (2.5.2)
104
+ nio4r (2.5.2-java)
105
+ nokogiri (1.10.8)
98
106
  mini_portile2 (~> 2.4.0)
99
- parallel (1.17.0)
100
- parser (2.6.3.0)
107
+ nokogiri (1.10.8-java)
108
+ parallel (1.19.1)
109
+ parser (2.7.0.4)
101
110
  ast (~> 2.4.0)
102
111
  pry (0.12.2)
103
112
  coderay (~> 1.1.0)
104
113
  method_source (~> 0.9.0)
105
- pry-byebug (3.7.0)
114
+ pry-byebug (3.8.0)
106
115
  byebug (~> 11.0)
107
116
  pry (~> 0.10)
108
- rack (2.0.7)
109
- rack-protection (2.0.7)
117
+ rack (2.2.2)
118
+ rack-protection (2.0.8.1)
110
119
  rack
111
120
  rack-test (1.1.0)
112
121
  rack (>= 1.0, < 3)
113
- rails (6.0.0)
114
- actioncable (= 6.0.0)
115
- actionmailbox (= 6.0.0)
116
- actionmailer (= 6.0.0)
117
- actionpack (= 6.0.0)
118
- actiontext (= 6.0.0)
119
- actionview (= 6.0.0)
120
- activejob (= 6.0.0)
121
- activemodel (= 6.0.0)
122
- activerecord (= 6.0.0)
123
- activestorage (= 6.0.0)
124
- activesupport (= 6.0.0)
122
+ rails (6.0.2.1)
123
+ actioncable (= 6.0.2.1)
124
+ actionmailbox (= 6.0.2.1)
125
+ actionmailer (= 6.0.2.1)
126
+ actionpack (= 6.0.2.1)
127
+ actiontext (= 6.0.2.1)
128
+ actionview (= 6.0.2.1)
129
+ activejob (= 6.0.2.1)
130
+ activemodel (= 6.0.2.1)
131
+ activerecord (= 6.0.2.1)
132
+ activestorage (= 6.0.2.1)
133
+ activesupport (= 6.0.2.1)
125
134
  bundler (>= 1.3.0)
126
- railties (= 6.0.0)
135
+ railties (= 6.0.2.1)
127
136
  sprockets-rails (>= 2.0.0)
128
137
  rails-dom-testing (2.0.3)
129
138
  activesupport (>= 4.2.0)
130
139
  nokogiri (>= 1.6)
131
- rails-html-sanitizer (1.2.0)
132
- loofah (~> 2.2, >= 2.2.2)
133
- railties (6.0.0)
134
- actionpack (= 6.0.0)
135
- activesupport (= 6.0.0)
140
+ rails-html-sanitizer (1.3.0)
141
+ loofah (~> 2.3)
142
+ railties (6.0.2.1)
143
+ actionpack (= 6.0.2.1)
144
+ activesupport (= 6.0.2.1)
136
145
  method_source
137
146
  rake (>= 0.8.7)
138
147
  thor (>= 0.20.3, < 2.0)
139
148
  rainbow (3.0.0)
140
- rake (12.3.3)
141
- redis (4.1.2)
142
- redis-namespace (1.6.0)
149
+ rake (13.0.1)
150
+ redis (4.1.3)
151
+ redis-namespace (1.7.0)
143
152
  redis (>= 3.0.4)
144
- rubocop (0.72.0)
153
+ rubocop (0.79.0)
145
154
  jaro_winkler (~> 1.5.1)
146
155
  parallel (~> 1.10)
147
- parser (>= 2.6)
156
+ parser (>= 2.7.0.1)
148
157
  rainbow (>= 2.2.2, < 4.0)
149
158
  ruby-progressbar (~> 1.7)
150
159
  unicode-display_width (>= 1.4.0, < 1.7)
151
- rubocop-performance (1.4.1)
160
+ rubocop-performance (1.5.2)
152
161
  rubocop (>= 0.71.0)
153
162
  ruby-progressbar (1.10.1)
154
- simplecov (0.17.0)
163
+ simplecov (0.18.2)
155
164
  docile (~> 1.1)
156
- json (>= 1.8, < 3)
157
- simplecov-html (~> 0.10.0)
158
- simplecov-html (0.10.2)
159
- sprockets (3.7.2)
165
+ simplecov-html (~> 0.11)
166
+ simplecov-html (0.12.0)
167
+ sprockets (4.0.0)
160
168
  concurrent-ruby (~> 1.0)
161
169
  rack (> 1, < 3)
162
170
  sprockets-rails (3.2.1)
163
171
  actionpack (>= 4.0)
164
172
  activesupport (>= 4.0)
165
173
  sprockets (>= 3.0.0)
166
- sqlite3 (1.4.1)
167
- standard (0.1.2)
168
- rubocop (~> 0.72.0)
169
- rubocop-performance (~> 1.4.0)
170
- thor (0.20.3)
174
+ sqlite3 (1.4.2)
175
+ standard (0.2.1)
176
+ rubocop (~> 0.79.0)
177
+ rubocop-performance (~> 1.5.1)
178
+ thor (1.0.1)
171
179
  thread_safe (0.3.6)
180
+ thread_safe (0.3.6-java)
172
181
  toxiproxy (1.0.3)
173
- tzinfo (1.2.5)
182
+ tzinfo (1.2.6)
174
183
  thread_safe (~> 0.1)
175
- unicode-display_width (1.6.0)
184
+ unicode-display_width (1.6.1)
176
185
  websocket-driver (0.7.1)
177
186
  websocket-extensions (>= 0.1.0)
187
+ websocket-driver (0.7.1-java)
188
+ websocket-extensions (>= 0.1.0)
178
189
  websocket-extensions (0.1.4)
179
- zeitwerk (2.1.9)
190
+ zeitwerk (2.2.2)
180
191
 
181
192
  PLATFORMS
193
+ java
182
194
  ruby
183
195
 
184
196
  DEPENDENCIES
@@ -186,7 +198,7 @@ DEPENDENCIES
186
198
  hiredis
187
199
  minitest
188
200
  pry-byebug
189
- rails
201
+ rails (>= 6.0.2)
190
202
  rake
191
203
  redis-namespace
192
204
  sidekiq!
data/Pro-Changes.md CHANGED
@@ -2,14 +2,28 @@
2
2
 
3
3
  [Sidekiq Changes](https://github.com/mperham/sidekiq/blob/master/Changes.md) | [Sidekiq Pro Changes](https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md)
4
4
 
5
- Please see [http://sidekiq.org/](http://sidekiq.org/) for more details and how to buy.
5
+ Please see [http://sidekiq.org](http://sidekiq.org) for more details and how to buy.
6
+
7
+ HEAD
8
+ ---------
9
+
10
+ - Update `constantize` for batch callbacks. [#4469]
11
+
12
+
13
+ 5.0.1
14
+ ---------
15
+
16
+ - Rejigger batch failures UI to add direct links to retries and scheduled jobs [#4209]
17
+ - Delete batch data with `UNLINK` [#4155]
18
+ - Fix bug where a scheduled job can lose its scheduled time when using reliable push [#4267]
19
+ - Sidekiq::JobSet#scan and #find_job APIs have been promoted to Sidekiq OSS. [#4259]
6
20
 
7
21
  5.0.0
8
22
  ---------
9
23
 
10
24
  - There is no significant migration from Sidekiq Pro 4.0 to 5.0
11
25
  but make sure you read the [update notes for Sidekiq
12
- 6.0](/mperham/sidekiq/blob/master/6.0-Upgrade.md).
26
+ 6.0](https://github.com/mperham/sidekiq/blob/master/6.0-Upgrade.md).
13
27
  - Removed various deprecated APIs and associated warnings.
14
28
  - **BREAKING CHANGE** Remove the `Sidekiq::Batch::Status#dead_jobs` API in favor of
15
29
  `Sidekiq::Batch::Status#dead_jids`. [#4217]
data/README.md CHANGED
@@ -3,6 +3,7 @@ Sidekiq
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/sidekiq.svg)](https://rubygems.org/gems/sidekiq)
5
5
  [![Code Climate](https://codeclimate.com/github/mperham/sidekiq.svg)](https://codeclimate.com/github/mperham/sidekiq)
6
+ [![Test Coverage](https://codeclimate.com/github/mperham/sidekiq/badges/coverage.svg)](https://codeclimate.com/github/mperham/sidekiq/coverage)
6
7
  [![Build Status](https://circleci.com/gh/mperham/sidekiq/tree/master.svg?style=svg)](https://circleci.com/gh/mperham/sidekiq/tree/master)
7
8
  [![Gitter Chat](https://badges.gitter.im/mperham/sidekiq.svg)](https://gitter.im/mperham/sidekiq)
8
9
 
@@ -18,7 +19,8 @@ Performance
18
19
 
19
20
  Version | Latency | Garbage created for 10k jobs | Time to process 100k jobs | Throughput | Ruby
20
21
  -----------------|------|---------|---------|------------------------|-----
21
- Sidekiq 6.0.0 | 3 ms | 156 MB | 19 sec | **5200 jobs/sec** | MRI 2.6.3
22
+ Sidekiq 6.0.2 | 3 ms | 156 MB | 14.0 sec| **7100 jobs/sec** | MRI 2.6.3
23
+ Sidekiq 6.0.0 | 3 ms | 156 MB | 19 sec | 5200 jobs/sec | MRI 2.6.3
22
24
  Sidekiq 4.0.0 | 10 ms | 151 MB | 22 sec | 4500 jobs/sec |
23
25
  Sidekiq 3.5.1 | 22 ms | 1257 MB | 125 sec | 800 jobs/sec |
24
26
  Resque 1.25.2 | - | - | 420 sec | 240 jobs/sec |
data/bin/sidekiq CHANGED
@@ -6,9 +6,28 @@ $TESTING = false
6
6
 
7
7
  require_relative '../lib/sidekiq/cli'
8
8
 
9
+ def integrate_with_systemd
10
+ return unless ENV["NOTIFY_SOCKET"]
11
+
12
+ Sidekiq.configure_server do |config|
13
+ Sidekiq.logger.info "Enabling systemd notification integration"
14
+ require "sidekiq/sd_notify"
15
+ config.on(:startup) do
16
+ Sidekiq::SdNotify.ready
17
+ end
18
+ config.on(:shutdown) do
19
+ Sidekiq::SdNotify.stopping
20
+ end
21
+ Sidekiq.start_watchdog if Sidekiq::SdNotify.watchdog?
22
+ end
23
+ end
24
+
9
25
  begin
10
26
  cli = Sidekiq::CLI.instance
11
27
  cli.parse
28
+
29
+ integrate_with_systemd
30
+
12
31
  cli.run
13
32
  rescue => e
14
33
  raise e if $DEBUG
data/bin/sidekiqload CHANGED
@@ -5,7 +5,8 @@
5
5
  $TESTING = false
6
6
 
7
7
  #require 'ruby-prof'
8
- Bundler.require(:default)
8
+ require 'bundler/setup'
9
+ Bundler.require(:default, :load_test)
9
10
 
10
11
  require_relative '../lib/sidekiq/cli'
11
12
  require_relative '../lib/sidekiq/launcher'
@@ -102,17 +103,20 @@ iter.times do
102
103
  end
103
104
  Sidekiq.logger.error "Created #{count*iter} jobs"
104
105
 
106
+ start = Time.now
107
+
105
108
  Monitoring = Thread.new do
106
109
  watchdog("monitor thread") do
107
110
  while true
108
- sleep 0.5
111
+ sleep 0.2
109
112
  qsize = Sidekiq.redis do |conn|
110
113
  conn.llen "queue:default"
111
114
  end
112
115
  total = qsize
113
- Sidekiq.logger.error("RSS: #{Process.rss} Pending: #{total}")
116
+ #Sidekiq.logger.error("RSS: #{Process.rss} Pending: #{total}")
114
117
  if total == 0
115
- Sidekiq.logger.error("Done, now here's the latency for three jobs")
118
+ Sidekiq.logger.error("Done, #{iter * count} jobs in #{Time.now - start} sec")
119
+ Sidekiq.logger.error("Now here's the latency for three jobs")
116
120
 
117
121
  LoadWorker.perform_async(1, Time.now.to_f)
118
122
  LoadWorker.perform_async(2, Time.now.to_f)
data/bin/sidekiqmon CHANGED
@@ -2,8 +2,7 @@
2
2
 
3
3
  require 'sidekiq/monitor'
4
4
 
5
- if ARGV[0] == 'status'
6
- Sidekiq::Monitor::Status.new.display(ARGV[1])
7
- else
8
- Sidekiq::Monitor.print_usage
9
- end
5
+ section = "all"
6
+ section = ARGV[0] if ARGV.size == 1
7
+
8
+ Sidekiq::Monitor::Status.new.display(section)