sidekiq 2.17.8 → 3.0.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.
- checksums.yaml +4 -4
- data/3.0-Upgrade.md +63 -0
- data/Changes.md +66 -3
- data/Contributing.md +1 -3
- data/Pro-Changes.md +18 -0
- data/README.md +2 -2
- data/bin/sidekiqctl +19 -6
- data/lib/sidekiq.rb +53 -11
- data/lib/sidekiq/actor.rb +1 -0
- data/lib/sidekiq/api.rb +145 -58
- data/lib/sidekiq/cli.rb +22 -18
- data/lib/sidekiq/client.rb +44 -14
- data/lib/sidekiq/core_ext.rb +5 -8
- data/lib/sidekiq/exception_handler.rb +19 -28
- data/lib/sidekiq/fetch.rb +3 -3
- data/lib/sidekiq/launcher.rb +30 -3
- data/lib/sidekiq/logging.rb +2 -2
- data/lib/sidekiq/manager.rb +19 -16
- data/lib/sidekiq/middleware/chain.rb +1 -1
- data/lib/sidekiq/middleware/i18n.rb +1 -1
- data/lib/sidekiq/middleware/server/retry_jobs.rb +23 -7
- data/lib/sidekiq/processor.rb +36 -54
- data/lib/sidekiq/redis_connection.rb +1 -3
- data/lib/sidekiq/util.rb +4 -4
- data/lib/sidekiq/version.rb +1 -1
- data/lib/sidekiq/web.rb +57 -8
- data/lib/sidekiq/web_helpers.rb +6 -15
- data/lib/sidekiq/worker.rb +3 -1
- data/sidekiq.gemspec +5 -5
- data/test/test_api.rb +59 -19
- data/test/test_cli.rb +1 -1
- data/test/test_client.rb +44 -5
- data/test/test_exception_handler.rb +4 -87
- data/test/test_middleware.rb +3 -2
- data/test/test_redis_connection.rb +0 -6
- data/test/test_retry.rb +13 -68
- data/test/test_scheduled.rb +1 -1
- data/test/test_scheduling.rb +5 -0
- data/test/test_sidekiq.rb +18 -0
- data/test/test_web.rb +98 -58
- data/web/assets/stylesheets/application.css +5 -0
- data/web/locales/cs.yml +68 -0
- data/web/locales/da.yml +9 -1
- data/web/locales/de.yml +15 -7
- data/web/locales/el.yml +68 -0
- data/web/locales/en.yml +8 -3
- data/web/locales/es.yml +9 -1
- data/web/locales/fr.yml +34 -26
- data/web/locales/it.yml +26 -18
- data/web/locales/ja.yml +8 -2
- data/web/locales/ko.yml +0 -2
- data/web/locales/nl.yml +8 -3
- data/web/locales/no.yml +9 -3
- data/web/locales/pl.yml +0 -1
- data/web/locales/pt-br.yml +11 -4
- data/web/locales/pt.yml +8 -1
- data/web/locales/ru.yml +29 -22
- data/web/locales/sv.yml +68 -0
- data/web/locales/zh-tw.yml +68 -0
- data/web/views/_job_info.erb +8 -2
- data/web/views/_summary.erb +13 -7
- data/web/views/busy.erb +55 -0
- data/web/views/dead.erb +30 -0
- data/web/views/layout.erb +1 -0
- data/web/views/morgue.erb +66 -0
- metadata +29 -30
- data/config.ru +0 -18
- data/lib/sidekiq/capistrano.rb +0 -5
- data/lib/sidekiq/capistrano2.rb +0 -54
- data/lib/sidekiq/tasks/sidekiq.rake +0 -119
- data/lib/sidekiq/yaml_patch.rb +0 -21
- data/test/test_util.rb +0 -18
- data/web/views/_workers.erb +0 -22
- data/web/views/workers.erb +0 -16
data/lib/sidekiq/yaml_patch.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# YAML marshalling of instances can fail in some circumstances,
|
2
|
-
# e.g. when the instance has a handle to a Proc. This monkeypatch limits
|
3
|
-
# the YAML serialization to just AR's internal @attributes hash.
|
4
|
-
# The paperclip gem litters AR instances with Procs, for instance.
|
5
|
-
#
|
6
|
-
# Courtesy of @ryanlecompte https://gist.github.com/007b88ae90372d1a3321
|
7
|
-
#
|
8
|
-
|
9
|
-
if defined?(::ActiveRecord)
|
10
|
-
class ActiveRecord::Base
|
11
|
-
yaml_as "tag:ruby.yaml.org,2002:ActiveRecord"
|
12
|
-
|
13
|
-
def self.yaml_new(klass, tag, val)
|
14
|
-
klass.unscoped.find(val['attributes'][klass.primary_key])
|
15
|
-
end
|
16
|
-
|
17
|
-
def to_yaml_properties
|
18
|
-
['@attributes']
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/test/test_util.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'helper'
|
2
|
-
require 'sidekiq/util'
|
3
|
-
|
4
|
-
class TestUtil < Sidekiq::Test
|
5
|
-
describe 'util' do
|
6
|
-
it 'generates the same process id when included in two or more classes' do
|
7
|
-
class One
|
8
|
-
include Sidekiq::Util
|
9
|
-
end
|
10
|
-
|
11
|
-
class Two
|
12
|
-
include Sidekiq::Util
|
13
|
-
end
|
14
|
-
|
15
|
-
assert_equal One.new.process_id, Two.new.process_id
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
data/web/views/_workers.erb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
<table class="workers table table-hover table-bordered table-striped table-white">
|
2
|
-
<thead>
|
3
|
-
<th><%= t('Worker') %></th>
|
4
|
-
<th><%= t('Queue') %></th>
|
5
|
-
<th><%= t('Class') %></th>
|
6
|
-
<th><%= t('Arguments') %></th>
|
7
|
-
<th><%= t('Started') %></th>
|
8
|
-
</thead>
|
9
|
-
<% workers.each_with_index do |(worker, msg, run_at), index| %>
|
10
|
-
<tr>
|
11
|
-
<td><%= worker %></td>
|
12
|
-
<td>
|
13
|
-
<a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
|
14
|
-
</td>
|
15
|
-
<td><%= msg['payload']['class'] %></td>
|
16
|
-
<td>
|
17
|
-
<div class="args"><%= display_args(msg['payload']['args']) %></div>
|
18
|
-
</td>
|
19
|
-
<td><%= relative_time(Time.at(msg['run_at'])) %></td>
|
20
|
-
</tr>
|
21
|
-
<% end %>
|
22
|
-
</table>
|
data/web/views/workers.erb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
<div class="row header">
|
2
|
-
<div class="col-sm-7">
|
3
|
-
<h3><%= t('Workers') %></h3>
|
4
|
-
</div>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<%= erb :_workers %>
|
8
|
-
<% if workers_size > 0 %>
|
9
|
-
<div class="row">
|
10
|
-
<div class="col-sm-2 pull-right">
|
11
|
-
<form action="<%= root_path %>reset" method="post">
|
12
|
-
<button class="btn btn-primary btn-block" type="submit"><%= t('ClearWorkerList') %></button>
|
13
|
-
</form>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
<% end %>
|