sidekiq 6.0.7 → 6.2.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.

Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +70 -1
  3. data/README.md +2 -6
  4. data/bin/sidekiq +7 -2
  5. data/lib/sidekiq.rb +5 -3
  6. data/lib/sidekiq/api.rb +28 -10
  7. data/lib/sidekiq/cli.rb +23 -7
  8. data/lib/sidekiq/client.rb +16 -11
  9. data/lib/sidekiq/extensions/action_mailer.rb +3 -2
  10. data/lib/sidekiq/extensions/active_record.rb +4 -3
  11. data/lib/sidekiq/extensions/class_methods.rb +5 -4
  12. data/lib/sidekiq/fetch.rb +29 -21
  13. data/lib/sidekiq/job_retry.rb +1 -0
  14. data/lib/sidekiq/launcher.rb +55 -3
  15. data/lib/sidekiq/logger.rb +3 -2
  16. data/lib/sidekiq/manager.rb +4 -4
  17. data/lib/sidekiq/middleware/chain.rb +1 -1
  18. data/lib/sidekiq/processor.rb +4 -4
  19. data/lib/sidekiq/rails.rb +16 -18
  20. data/lib/sidekiq/redis_connection.rb +15 -12
  21. data/lib/sidekiq/sd_notify.rb +1 -1
  22. data/lib/sidekiq/testing.rb +1 -1
  23. data/lib/sidekiq/version.rb +1 -1
  24. data/lib/sidekiq/web.rb +35 -72
  25. data/lib/sidekiq/web/application.rb +9 -5
  26. data/lib/sidekiq/web/csrf_protection.rb +177 -0
  27. data/lib/sidekiq/web/helpers.rb +26 -8
  28. data/lib/sidekiq/web/router.rb +5 -2
  29. data/lib/sidekiq/worker.rb +2 -5
  30. data/sidekiq.gemspec +11 -4
  31. data/web/assets/images/apple-touch-icon.png +0 -0
  32. data/web/assets/javascripts/application.js +3 -8
  33. data/web/assets/stylesheets/application-dark.css +71 -33
  34. data/web/assets/stylesheets/application.css +24 -8
  35. data/web/locales/fr.yml +1 -1
  36. data/web/locales/pl.yml +4 -4
  37. data/web/locales/ru.yml +4 -0
  38. data/web/views/busy.erb +44 -14
  39. data/web/views/layout.erb +1 -0
  40. data/web/views/morgue.erb +1 -1
  41. data/web/views/queues.erb +1 -1
  42. data/web/views/retries.erb +1 -1
  43. data/web/views/scheduled.erb +1 -1
  44. metadata +17 -45
  45. data/.circleci/config.yml +0 -60
  46. data/.github/contributing.md +0 -32
  47. data/.github/issue_template.md +0 -11
  48. data/.gitignore +0 -13
  49. data/.standard.yml +0 -20
  50. data/3.0-Upgrade.md +0 -70
  51. data/4.0-Upgrade.md +0 -53
  52. data/5.0-Upgrade.md +0 -56
  53. data/6.0-Upgrade.md +0 -72
  54. data/COMM-LICENSE +0 -97
  55. data/Ent-2.0-Upgrade.md +0 -37
  56. data/Ent-Changes.md +0 -256
  57. data/Gemfile +0 -24
  58. data/Gemfile.lock +0 -208
  59. data/Pro-2.0-Upgrade.md +0 -138
  60. data/Pro-3.0-Upgrade.md +0 -44
  61. data/Pro-4.0-Upgrade.md +0 -35
  62. data/Pro-5.0-Upgrade.md +0 -25
  63. data/Pro-Changes.md +0 -782
  64. data/Rakefile +0 -10
  65. data/code_of_conduct.md +0 -50
@@ -127,6 +127,10 @@ header.row .pagination {
127
127
  width: 14%;
128
128
  }
129
129
  @media (max-width: 767px) and (min-width: 200px) {
130
+ .summary_bar {
131
+ font-size: 1.5em;
132
+ }
133
+
130
134
  .summary_bar ul li {
131
135
  width: 100%;
132
136
  }
@@ -177,10 +181,6 @@ header.row .pagination {
177
181
  overflow: overlay;
178
182
  }
179
183
 
180
- table.table-white {
181
- background-color: #fff;
182
- }
183
-
184
184
  .queues form {
185
185
  margin: 0;
186
186
  }
@@ -190,7 +190,7 @@ form .btn {
190
190
  }
191
191
 
192
192
  form .btn-group .btn {
193
- margin-right: 1px;
193
+ margin-right: 4px;
194
194
  }
195
195
 
196
196
  td form {
@@ -442,7 +442,7 @@ img.smallogo {
442
442
  margin: 5px 10px 5px 5px;
443
443
  }
444
444
  .stat p{
445
- font-size: 1em;
445
+ font-size: 1.5em;
446
446
  margin: 5px 5px 5px 10px;
447
447
  }
448
448
  }
@@ -469,6 +469,11 @@ span.current-interval {
469
469
 
470
470
  div.interval-slider input {
471
471
  width: 160px;
472
+ -webkit-appearance: none;
473
+ height: 3px;
474
+ margin-top: 5px;
475
+ border-radius: 2px;
476
+ background: currentcolor;
472
477
  }
473
478
 
474
479
  #realtime-legend,
@@ -757,7 +762,7 @@ div.interval-slider input {
757
762
  font-family: Arial, sans-serif;
758
763
  border-radius: 3px;
759
764
  padding: 6px;
760
- opacity: .5;
765
+ opacity: .7;
761
766
  border: 1px solid #e0e0e0;
762
767
  font-size: 12px;
763
768
  position: absolute;
@@ -972,7 +977,7 @@ div.interval-slider input {
972
977
  }
973
978
  .rickshaw_graph .y_ticks text,
974
979
  .rickshaw_graph .x_ticks_d3 text {
975
- opacity: .5;
980
+ opacity: .7;
976
981
  font-size: 12px;
977
982
  pointer-events: none
978
983
  }
@@ -1151,3 +1156,14 @@ div.interval-slider input {
1151
1156
  .delete-confirm {
1152
1157
  width: 20%;
1153
1158
  }
1159
+
1160
+ .info-circle {
1161
+ color: #f3f3f3;
1162
+ background-color: #dddddd;
1163
+ border-radius: 50%;
1164
+ text-align: center;
1165
+ vertical-align: middle;
1166
+ padding: 3px 7px;
1167
+ font-size: 0.7em;
1168
+ margin-left: 5px;
1169
+ }
data/web/locales/fr.yml CHANGED
@@ -72,7 +72,7 @@ fr:
72
72
  Quiet: Clore
73
73
  StopAll: Tout arrêter
74
74
  QuietAll: Tout clore
75
- PollingInterval: Interval de rafraîchissement
75
+ PollingInterval: Intervalle de rafraîchissement
76
76
  Plugins: Plugins
77
77
  NotYetEnqueued: Pas encore en file d'attente
78
78
  CreatedAt: Créée le
data/web/locales/pl.yml CHANGED
@@ -10,7 +10,7 @@ pl:
10
10
  Processed: Ukończone
11
11
  Failed: Nieudane
12
12
  Scheduled: Zaplanowane
13
- Retries: Prób
13
+ Retries: Do ponowienia
14
14
  Enqueued: Zakolejkowane
15
15
  Worker: Worker
16
16
  LivePoll: Wczytuj na żywo
@@ -29,15 +29,15 @@ pl:
29
29
  Queues: Kolejki
30
30
  Size: Rozmiar
31
31
  Actions: Akcje
32
- NextRetry: Kolejna próba
33
- RetryCount: Liczba prób
32
+ NextRetry: Następne ponowienie
33
+ RetryCount: Ilość ponowień
34
34
  RetryNow: Ponów teraz
35
35
  LastRetry: Ostatnie ponowienie
36
36
  OriginallyFailed: Ostatnio nieudane
37
37
  AreYouSure: Na pewno?
38
38
  DeleteAll: Usuń wszystko
39
39
  RetryAll: Powtórz wszystko
40
- NoRetriesFound: Brak powtórzeń
40
+ NoRetriesFound: Brak zadań do ponowienia
41
41
  Error: Błąd
42
42
  ErrorClass: Klasa błędu
43
43
  ErrorMessage: Wiadomosć błędu
data/web/locales/ru.yml CHANGED
@@ -38,6 +38,7 @@ ru:
38
38
  AreYouSure: Вы уверены?
39
39
  DeleteAll: Удалить все
40
40
  RetryAll: Повторить все
41
+ KillAll: Убить всё
41
42
  NoRetriesFound: Нет попыток
42
43
  Error: Ошибка
43
44
  ErrorClass: Класс ошибки
@@ -76,3 +77,6 @@ ru:
76
77
  NotYetEnqueued: Пока не в очереди
77
78
  CreatedAt: Создан
78
79
  BackToApp: Назад
80
+ Latency: Задержка
81
+ Pause: Пауза
82
+ Unpause: Возобновить
data/web/views/busy.erb CHANGED
@@ -1,8 +1,39 @@
1
1
  <div class="row header">
2
- <div class="col-sm-8 pull-left flip">
2
+ <div class="col-sm-4 pull-left flip">
3
+ <h3><%= t('Status') %></h3>
4
+ </div>
5
+ </div>
6
+
7
+ <div class="table_container">
8
+ <div class="stats-container">
9
+ <div class="stat">
10
+ <h3><%= s = processes.size; number_with_delimiter(s) %></h3>
11
+ <p><%= t('Processes') %></p>
12
+ </div>
13
+ <div class="stat">
14
+ <h3><%= x = processes.total_concurrency; number_with_delimiter(x) %></h3>
15
+ <p><%= t('Threads') %></p>
16
+ </div>
17
+ <div class="stat">
18
+ <h3><%= ws = workers.size; number_with_delimiter(ws) %></h3>
19
+ <p><%= t('Busy') %></p>
20
+ </div>
21
+ <div class="stat">
22
+ <h3><%= x == 0 ? 0 : ((ws / x.to_f) * 100).round(0) %>%</h3>
23
+ <p><%= t('Utilization') %></p>
24
+ </div>
25
+ <div class="stat">
26
+ <h3><%= format_memory(processes.total_rss) %></h3>
27
+ <p><%= t('RSS') %></p>
28
+ </div>
29
+ </div>
30
+ </div>
31
+
32
+ <div class="row header">
33
+ <div class="col-sm-4 pull-left flip">
3
34
  <h3><%= t('Processes') %></h3>
4
35
  </div>
5
- <div class="col-sm-4 pull-right flip">
36
+ <div class="col-sm-3 pull-right flip">
6
37
  <form method="POST" class="warning-messages">
7
38
  <%= csrf_tag %>
8
39
  <div class="btn-group pull-right flip">
@@ -12,14 +43,14 @@
12
43
  </form>
13
44
  </div>
14
45
  </div>
15
-
16
46
  <div class="table_container">
17
- <table class="processes table table-hover table-bordered table-striped table-white">
47
+ <table class="processes table table-hover table-bordered table-striped">
18
48
  <thead>
19
49
  <th><%= t('Name') %></th>
20
50
  <th><%= t('Started') %></th>
21
- <th><%= t('Threads') %></th>
22
- <th><%= t('Busy') %></th>
51
+ <th class="col-sm-1"><%= t('RSS') %><a href="https://github.com/mperham/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
52
+ <th class="col-sm-1"><%= t('Threads') %></th>
53
+ <th class="col-sm-1"><%= t('Busy') %></th>
23
54
  <th>&nbsp;</th>
24
55
  </thead>
25
56
  <% lead = processes.leader %>
@@ -42,19 +73,18 @@
42
73
  <%= process['queues'] * ", " %>
43
74
  </td>
44
75
  <td><%= relative_time(Time.at(process['started_at'])) %></td>
76
+ <td><%= format_memory(process['rss'].to_i) %></td>
45
77
  <td><%= process['concurrency'] %></td>
46
78
  <td><%= process['busy'] %></td>
47
79
  <td>
48
- <div class="btn-group pull-right flip">
49
- <form method="POST">
80
+ <form method="POST">
81
+ <div class="btn-group pull-right flip">
50
82
  <%= csrf_tag %>
51
83
  <input type="hidden" name="identity" value="<%= process['identity'] %>"/>
52
- <% unless process.stopping? %>
53
- <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
54
- <% end %>
84
+ <% unless process.stopping? %><button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
55
85
  <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
56
- </form>
57
- </div>
86
+ </div>
87
+ </form>
58
88
  </td>
59
89
  </tr>
60
90
  <% end %>
@@ -68,7 +98,7 @@
68
98
  </div>
69
99
 
70
100
  <div class="table_container">
71
- <table class="workers table table-hover table-bordered table-striped table-white">
101
+ <table class="workers table table-hover table-bordered table-striped">
72
102
  <thead>
73
103
  <th><%= t('Process') %></th>
74
104
  <th><%= t('TID') %></th>
data/web/views/layout.erb CHANGED
@@ -16,6 +16,7 @@
16
16
  <link href="<%= root_path %>stylesheets/application-rtl.css" media="screen" rel="stylesheet" type="text/css" />
17
17
  <% end %>
18
18
 
19
+ <link rel="apple-touch-icon" href="<%= root_path %>images/apple-touch-icon.png">
19
20
  <link rel="shortcut icon" type="image/ico" href="<%= root_path %>images/favicon.ico" />
20
21
  <script type="text/javascript" src="<%= root_path %>javascripts/application.js"></script>
21
22
  <meta name="google" content="notranslate" />
data/web/views/morgue.erb CHANGED
@@ -14,7 +14,7 @@
14
14
  <form action="<%= root_path %>morgue" method="post">
15
15
  <%= csrf_tag %>
16
16
  <div class="table_container">
17
- <table class="table table-striped table-bordered table-white">
17
+ <table class="table table-striped table-bordered">
18
18
  <thead>
19
19
  <tr>
20
20
  <th class="table-checkbox checkbox-column">
data/web/views/queues.erb CHANGED
@@ -1,7 +1,7 @@
1
1
  <h3><%= t('Queues') %></h3>
2
2
 
3
3
  <div class="table_container">
4
- <table class="queues table table-hover table-bordered table-striped table-white">
4
+ <table class="queues table table-hover table-bordered table-striped">
5
5
  <thead>
6
6
  <th><%= t('Queue') %></th>
7
7
  <th><%= t('Size') %></th>
@@ -14,7 +14,7 @@
14
14
  <form action="<%= root_path %>retries" method="post">
15
15
  <%= csrf_tag %>
16
16
  <div class="table_container">
17
- <table class="table table-striped table-bordered table-white">
17
+ <table class="table table-striped table-bordered">
18
18
  <thead>
19
19
  <tr>
20
20
  <th class="table-checkbox checkbox-column">
@@ -15,7 +15,7 @@
15
15
  <form action="<%= root_path %>scheduled" method="post">
16
16
  <%= csrf_tag %>
17
17
  <div class="table_container">
18
- <table class="table table-striped table-bordered table-white">
18
+ <table class="table table-striped table-bordered">
19
19
  <thead>
20
20
  <tr>
21
21
  <th class="checkbox-column">
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: 6.0.7
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-17 00:00:00.000000000 Z
11
+ date: 2021-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.1.0
19
+ version: 4.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 4.1.0
26
+ version: 4.2.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: connection_pool
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rack-protection
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: 2.0.0
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: 2.0.0
69
55
  description: Simple, efficient background processing for Ruby.
70
56
  email:
71
57
  - mperham@gmail.com
@@ -75,33 +61,12 @@ executables:
75
61
  extensions: []
76
62
  extra_rdoc_files: []
77
63
  files:
78
- - ".circleci/config.yml"
79
- - ".github/contributing.md"
80
- - ".github/issue_template.md"
81
- - ".gitignore"
82
- - ".standard.yml"
83
- - 3.0-Upgrade.md
84
- - 4.0-Upgrade.md
85
- - 5.0-Upgrade.md
86
- - 6.0-Upgrade.md
87
- - COMM-LICENSE
88
64
  - Changes.md
89
- - Ent-2.0-Upgrade.md
90
- - Ent-Changes.md
91
- - Gemfile
92
- - Gemfile.lock
93
65
  - LICENSE
94
- - Pro-2.0-Upgrade.md
95
- - Pro-3.0-Upgrade.md
96
- - Pro-4.0-Upgrade.md
97
- - Pro-5.0-Upgrade.md
98
- - Pro-Changes.md
99
66
  - README.md
100
- - Rakefile
101
67
  - bin/sidekiq
102
68
  - bin/sidekiqload
103
69
  - bin/sidekiqmon
104
- - code_of_conduct.md
105
70
  - lib/generators/sidekiq/templates/worker.rb.erb
106
71
  - lib/generators/sidekiq/templates/worker_spec.rb.erb
107
72
  - lib/generators/sidekiq/templates/worker_test.rb.erb
@@ -139,10 +104,12 @@ files:
139
104
  - lib/sidekiq/web.rb
140
105
  - lib/sidekiq/web/action.rb
141
106
  - lib/sidekiq/web/application.rb
107
+ - lib/sidekiq/web/csrf_protection.rb
142
108
  - lib/sidekiq/web/helpers.rb
143
109
  - lib/sidekiq/web/router.rb
144
110
  - lib/sidekiq/worker.rb
145
111
  - sidekiq.gemspec
112
+ - web/assets/images/apple-touch-icon.png
146
113
  - web/assets/images/favicon.ico
147
114
  - web/assets/images/logo.png
148
115
  - web/assets/images/status.png
@@ -199,11 +166,16 @@ files:
199
166
  - web/views/retry.erb
200
167
  - web/views/scheduled.erb
201
168
  - web/views/scheduled_job_info.erb
202
- homepage: http://sidekiq.org
169
+ homepage: https://sidekiq.org
203
170
  licenses:
204
171
  - LGPL-3.0
205
- metadata: {}
206
- post_install_message:
172
+ metadata:
173
+ homepage_uri: https://sidekiq.org
174
+ bug_tracker_uri: https://github.com/mperham/sidekiq/issues
175
+ documentation_uri: https://github.com/mperham/sidekiq/wiki
176
+ changelog_uri: https://github.com/mperham/sidekiq/blob/master/Changes.md
177
+ source_code_uri: https://github.com/mperham/sidekiq
178
+ post_install_message:
207
179
  rdoc_options: []
208
180
  require_paths:
209
181
  - lib
@@ -218,8 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
190
  - !ruby/object:Gem::Version
219
191
  version: '0'
220
192
  requirements: []
221
- rubygems_version: 3.0.3
222
- signing_key:
193
+ rubygems_version: 3.1.4
194
+ signing_key:
223
195
  specification_version: 4
224
196
  summary: Simple, efficient background processing for Ruby
225
197
  test_files: []
data/.circleci/config.yml DELETED
@@ -1,60 +0,0 @@
1
- version: 2
2
- references:
3
- unit: &unit
4
- run:
5
- name: Run test suite
6
- command: bundle exec rake
7
- restore: &restore
8
- restore_cache:
9
- keys:
10
- - v1-dependencies-{{ checksum "Gemfile.lock" }}
11
- # fallback to using the latest cache if no exact match is found
12
- - v1-dependencies-
13
- bundle: &bundle
14
- run:
15
- name: install dependencies
16
- command: |
17
- bundle install --jobs=4 --retry=3 --path vendor/bundle
18
- save: &save
19
- save_cache:
20
- paths:
21
- - ./vendor/bundle
22
- key: v1-dependencies-{{ checksum "Gemfile.lock" }}
23
- jobs:
24
- "ruby-2.5":
25
- docker:
26
- - image: circleci/ruby:2.5
27
- - image: circleci/redis:4.0
28
- steps:
29
- - checkout
30
- - <<: *restore
31
- - <<: *bundle
32
- - <<: *save
33
- - <<: *unit
34
- "ruby-2.6":
35
- docker:
36
- - image: circleci/ruby:2.6
37
- - image: circleci/redis:4.0
38
- steps:
39
- - checkout
40
- - <<: *restore
41
- - <<: *bundle
42
- - <<: *save
43
- - <<: *unit
44
- "jruby":
45
- docker:
46
- - image: circleci/jruby:latest
47
- - image: circleci/redis:4.0
48
- steps:
49
- - checkout
50
- - <<: *restore
51
- - <<: *bundle
52
- - <<: *save
53
- - <<: *unit
54
-
55
- workflows:
56
- version: 2
57
- build:
58
- jobs:
59
- - "ruby-2.5"
60
- - "ruby-2.6"