sidekiq 6.1.3 → 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.

data/sidekiq.gemspec CHANGED
@@ -9,11 +9,19 @@ Gem::Specification.new do |gem|
9
9
  gem.license = "LGPL-3.0"
10
10
 
11
11
  gem.executables = ["sidekiq", "sidekiqmon"]
12
- gem.files = `git ls-files | grep -Ev '^(test|myapp|examples)'`.split("\n")
12
+ gem.files = ["sidekiq.gemspec", "README.md", "Changes.md", "LICENSE"] + `git ls-files | grep -E '^(bin|lib|web)'`.split("\n")
13
13
  gem.name = "sidekiq"
14
14
  gem.version = Sidekiq::VERSION
15
15
  gem.required_ruby_version = ">= 2.5.0"
16
16
 
17
+ gem.metadata = {
18
+ "homepage_uri" => "https://sidekiq.org",
19
+ "bug_tracker_uri" => "https://github.com/mperham/sidekiq/issues",
20
+ "documentation_uri" => "https://github.com/mperham/sidekiq/wiki",
21
+ "changelog_uri" => "https://github.com/mperham/sidekiq/blob/master/Changes.md",
22
+ "source_code_uri" => "https://github.com/mperham/sidekiq"
23
+ }
24
+
17
25
  gem.add_dependency "redis", ">= 4.2.0"
18
26
  gem.add_dependency "connection_pool", ">= 2.2.2"
19
27
  gem.add_dependency "rack", "~> 2.0"
@@ -147,3 +147,14 @@ input {
147
147
  fill: #ddd;
148
148
  color: #ddd;
149
149
  }
150
+
151
+ .info-circle {
152
+ color: #282828;
153
+ background-color: #555555;
154
+ border-radius: 50%;
155
+ text-align: center;
156
+ vertical-align: middle;
157
+ padding: 3px 7px;
158
+ font-size: 0.7em;
159
+ margin-left: 5px;
160
+ }
@@ -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
  }
@@ -186,7 +190,7 @@ form .btn {
186
190
  }
187
191
 
188
192
  form .btn-group .btn {
189
- margin-right: 1px;
193
+ margin-right: 4px;
190
194
  }
191
195
 
192
196
  td form {
@@ -438,7 +442,7 @@ img.smallogo {
438
442
  margin: 5px 10px 5px 5px;
439
443
  }
440
444
  .stat p{
441
- font-size: 1em;
445
+ font-size: 1.5em;
442
446
  margin: 5px 5px 5px 10px;
443
447
  }
444
448
  }
@@ -1153,10 +1157,9 @@ div.interval-slider input {
1153
1157
  width: 20%;
1154
1158
  }
1155
1159
 
1156
- .circled {
1157
- border-color: #333;
1158
- color: #eee;
1159
- background-color: #b1003e;
1160
+ .info-circle {
1161
+ color: #f3f3f3;
1162
+ background-color: #dddddd;
1160
1163
  border-radius: 50%;
1161
1164
  text-align: center;
1162
1165
  vertical-align: middle;
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,15 +43,14 @@
12
43
  </form>
13
44
  </div>
14
45
  </div>
15
-
16
46
  <div class="table_container">
17
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('RSS') %><a href="https://github.com/mperham/sidekiq/wiki/Memory#rss"><span class="circled" title="Click to learn more about RSS">?</span></a></th>
22
- <th><%= t('Threads') %></th>
23
- <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>
24
54
  <th>&nbsp;</th>
25
55
  </thead>
26
56
  <% lead = processes.leader %>
@@ -47,16 +77,14 @@
47
77
  <td><%= process['concurrency'] %></td>
48
78
  <td><%= process['busy'] %></td>
49
79
  <td>
50
- <div class="btn-group pull-right flip">
51
- <form method="POST">
80
+ <form method="POST">
81
+ <div class="btn-group pull-right flip">
52
82
  <%= csrf_tag %>
53
83
  <input type="hidden" name="identity" value="<%= process['identity'] %>"/>
54
- <% unless process.stopping? %>
55
- <button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button>
56
- <% end %>
84
+ <% unless process.stopping? %><button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
57
85
  <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
58
- </form>
59
- </div>
86
+ </div>
87
+ </form>
60
88
  </td>
61
89
  </tr>
62
90
  <% end %>
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" />
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.1.3
4
+ version: 6.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-21 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
@@ -61,33 +61,12 @@ executables:
61
61
  extensions: []
62
62
  extra_rdoc_files: []
63
63
  files:
64
- - ".github/ISSUE_TEMPLATE/bug_report.md"
65
- - ".github/contributing.md"
66
- - ".github/workflows/ci.yml"
67
- - ".gitignore"
68
- - ".standard.yml"
69
- - 3.0-Upgrade.md
70
- - 4.0-Upgrade.md
71
- - 5.0-Upgrade.md
72
- - 6.0-Upgrade.md
73
- - COMM-LICENSE
74
64
  - Changes.md
75
- - Ent-2.0-Upgrade.md
76
- - Ent-Changes.md
77
- - Gemfile
78
- - Gemfile.lock
79
65
  - LICENSE
80
- - Pro-2.0-Upgrade.md
81
- - Pro-3.0-Upgrade.md
82
- - Pro-4.0-Upgrade.md
83
- - Pro-5.0-Upgrade.md
84
- - Pro-Changes.md
85
66
  - README.md
86
- - Rakefile
87
67
  - bin/sidekiq
88
68
  - bin/sidekiqload
89
69
  - bin/sidekiqmon
90
- - code_of_conduct.md
91
70
  - lib/generators/sidekiq/templates/worker.rb.erb
92
71
  - lib/generators/sidekiq/templates/worker_spec.rb.erb
93
72
  - lib/generators/sidekiq/templates/worker_test.rb.erb
@@ -130,6 +109,7 @@ files:
130
109
  - lib/sidekiq/web/router.rb
131
110
  - lib/sidekiq/worker.rb
132
111
  - sidekiq.gemspec
112
+ - web/assets/images/apple-touch-icon.png
133
113
  - web/assets/images/favicon.ico
134
114
  - web/assets/images/logo.png
135
115
  - web/assets/images/status.png
@@ -189,7 +169,12 @@ files:
189
169
  homepage: https://sidekiq.org
190
170
  licenses:
191
171
  - LGPL-3.0
192
- metadata: {}
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
193
178
  post_install_message:
194
179
  rdoc_options: []
195
180
  require_paths:
@@ -1,20 +0,0 @@
1
- ---
2
- name: Bug report
3
- about: Create a report to help us improve
4
- title: ''
5
- labels: ''
6
- assignees: ''
7
-
8
- ---
9
-
10
- Ruby version:
11
- Rails version:
12
- Sidekiq / Pro / Enterprise version(s):
13
-
14
- Please include your initializer, sidekiq.yml, and any error message with the full backtrace.
15
-
16
- If you are using an old version, have you checked the changelogs to see if your issue has been fixed in a later version?
17
-
18
- https://github.com/mperham/sidekiq/blob/master/Changes.md
19
- https://github.com/mperham/sidekiq/blob/master/Pro-Changes.md
20
- https://github.com/mperham/sidekiq/blob/master/Ent-Changes.md
@@ -1,32 +0,0 @@
1
- # Contributing
2
-
3
- ## Issues
4
-
5
- When opening an issue:
6
-
7
- * include the full **backtrace** with your error
8
- * include your Sidekiq initializer
9
- * list versions you are using: Ruby, Rails, Sidekiq, OS, etc.
10
-
11
- It's always better to include more info rather than less.
12
-
13
- ## Code
14
-
15
- It's always best to open an issue before investing a lot of time into a
16
- fix or new functionality. Functionality must meet my design goals and
17
- vision for the project to be accepted; I would be happy to discuss how
18
- your idea can best fit into Sidekiq.
19
-
20
- ## Legal
21
-
22
- By submitting a Pull Request, you disavow any rights or claims to any changes
23
- submitted to the Sidekiq project and assign the copyright of
24
- those changes to Contributed Systems LLC.
25
-
26
- If you cannot or do not want to reassign those rights (your employment
27
- contract for your employer may not allow this), you should not submit a PR.
28
- Open an issue and someone else can do the work.
29
-
30
- This is a legal way of saying "If you submit a PR to us, that code becomes ours".
31
- 99.9% of the time that's what you intend anyways; we hope it doesn't scare you
32
- away from contributing.
@@ -1,41 +0,0 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
8
-
9
- jobs:
10
- test:
11
-
12
- runs-on: ubuntu-latest
13
-
14
- strategy:
15
- fail-fast: false
16
- matrix:
17
- ruby: [2.5, 2.6, 2.7]
18
- services:
19
- redis:
20
- image: redis
21
- options: >-
22
- --health-cmd "redis-cli ping"
23
- --health-interval 10s
24
- --health-timeout 5s
25
- --health-retries 5
26
- ports:
27
- - 6379:6379
28
-
29
- steps:
30
- - uses: actions/checkout@v2
31
- - name: Set up Ruby
32
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
33
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
34
- uses: ruby/setup-ruby@v1
35
- with:
36
- bundler-cache: true
37
- ruby-version: ${{ matrix.ruby }}
38
- - name: Install dependencies
39
- run: bundle install
40
- - name: Run tests
41
- run: bundle exec rake
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- .rvmrc
2
- .ruby-version
3
- tags
4
- *.swp
5
- dump.rdb
6
- .rbx
7
- coverage/
8
- vendor/
9
- .bundle/
10
- .sass-cache/
11
- tmp/
12
- pkg/*.gem
13
- .byebug_history
data/.standard.yml DELETED
@@ -1,20 +0,0 @@
1
- ruby_version: 2.5.0
2
- fix: false
3
- parallel: true
4
- ignore:
5
- - test/**/*
6
- - examples/**/*
7
- - myapp/**/*
8
- - 'lib/sidekiq.rb':
9
- - Lint/InheritException
10
- - 'lib/sidekiq/extensions/**/*':
11
- - Style/MethodMissingSuper
12
- - Style/MissingRespondToMissing
13
- - 'lib/**/*':
14
- - Naming/AsciiIdentifiers
15
- - Lint/RescueException
16
- - Security/YAMLLoad
17
- - Naming/AccessorMethodName
18
- - Naming/MethodName
19
- - Style/GlobalVars
20
- - Style/Alias
data/3.0-Upgrade.md DELETED
@@ -1,70 +0,0 @@
1
- # Upgrading to Sidekiq 3.0
2
-
3
- Sidekiq 3.0 brings several new features but also removes old APIs and
4
- changes a few data elements in Redis. To upgrade cleanly:
5
-
6
- * Upgrade to the latest Sidekiq 2.x and run it for a few weeks.
7
- `gem 'sidekiq', '< 3'`
8
- This is only needed if you have retries pending.
9
- * 3rd party gems which use **client-side middleware** will need to update
10
- due to an API change. The Redis connection for a particular job is
11
- passed thru the middleware to handle sharding where jobs can
12
- be pushed to different redis server instances.
13
-
14
- `def call(worker_class, msg, queue, redis_pool)`
15
-
16
- Client-side middleware should use `redis_pool.with { |conn| ... }` to
17
- perform Redis operations and **not** `Sidekiq.redis`.
18
- * If you used the capistrano integration, you'll need to pull in the
19
- new [capistrano-sidekiq](https://github.com/seuros/capistrano-sidekiq)
20
- gem and use it in your deploy.rb.
21
- * API changes:
22
- - `Sidekiq::Client.registered_workers` replaced by `Sidekiq::Workers.new`
23
- - `Sidekiq::Client.registered_queues` replaced by `Sidekiq::Queue.all`
24
- - `Sidekiq::Worker#retries_exhausted` replaced by `Sidekiq::Worker.sidekiq_retries_exhausted`
25
- - `Sidekiq::Workers#each` has changed significantly with a reworking
26
- of Sidekiq's internal process/thread data model.
27
- * `sidekiq/api` is no longer automatically required. If your code uses
28
- the API, you will need to require it.
29
- * Redis-to-Go is no longer transparently activated on Heroku so as to not play
30
- favorites with any particular Redis service. You need to set a config option
31
- for your app:
32
- `heroku config:set REDIS_PROVIDER=REDISTOGO_URL`. You may also use
33
- the generic `REDIS_URL`. See
34
- [Advanced Options: Setting the Location of your Redis server][1]
35
- for details.
36
- * Anyone using Airbrake, Honeybadger, Exceptional or ExceptionNotifier
37
- will need to update their error gem version to the latest to pull in
38
- Sidekiq support. Sidekiq will not provide explicit support for these
39
- services so as to not play favorites with any particular error service.
40
- * MRI 1.9 is no longer officially supported. Sidekiq's official
41
- support policy is to support the current and previous major releases
42
- of MRI and Rails. As of February 2014, that's MRI 2.1, MRI 2.0, JRuby 1.7, Rails 4.0
43
- and Rails 3.2. I will consider PRs to fix issues found by users for
44
- other platforms/versions.
45
-
46
- ## Error Service Providers
47
-
48
- If you previously provided a middleware to capture job errors, you
49
- should instead provide a global error handler with Sidekiq 3.0. This
50
- ensures **any** error within Sidekiq will be logged appropriately, not
51
- just during job execution.
52
-
53
- ```ruby
54
- if Sidekiq::VERSION < '3'
55
- # old behavior
56
- Sidekiq.configure_server do |config|
57
- config.server_middleware do |chain|
58
- chain.add MyErrorService::Middleware
59
- end
60
- end
61
- else
62
- Sidekiq.configure_server do |config|
63
- config.error_handlers << proc {|ex,context| MyErrorService.notify(ex, context) }
64
- end
65
- end
66
- ```
67
-
68
- Your error handler must respond to `call(exception, context_hash)`.
69
-
70
- [1]: https://github.com/mperham/sidekiq/wiki/Advanced-Options#via-env-variable