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.

Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/3.0-Upgrade.md +63 -0
  3. data/Changes.md +66 -3
  4. data/Contributing.md +1 -3
  5. data/Pro-Changes.md +18 -0
  6. data/README.md +2 -2
  7. data/bin/sidekiqctl +19 -6
  8. data/lib/sidekiq.rb +53 -11
  9. data/lib/sidekiq/actor.rb +1 -0
  10. data/lib/sidekiq/api.rb +145 -58
  11. data/lib/sidekiq/cli.rb +22 -18
  12. data/lib/sidekiq/client.rb +44 -14
  13. data/lib/sidekiq/core_ext.rb +5 -8
  14. data/lib/sidekiq/exception_handler.rb +19 -28
  15. data/lib/sidekiq/fetch.rb +3 -3
  16. data/lib/sidekiq/launcher.rb +30 -3
  17. data/lib/sidekiq/logging.rb +2 -2
  18. data/lib/sidekiq/manager.rb +19 -16
  19. data/lib/sidekiq/middleware/chain.rb +1 -1
  20. data/lib/sidekiq/middleware/i18n.rb +1 -1
  21. data/lib/sidekiq/middleware/server/retry_jobs.rb +23 -7
  22. data/lib/sidekiq/processor.rb +36 -54
  23. data/lib/sidekiq/redis_connection.rb +1 -3
  24. data/lib/sidekiq/util.rb +4 -4
  25. data/lib/sidekiq/version.rb +1 -1
  26. data/lib/sidekiq/web.rb +57 -8
  27. data/lib/sidekiq/web_helpers.rb +6 -15
  28. data/lib/sidekiq/worker.rb +3 -1
  29. data/sidekiq.gemspec +5 -5
  30. data/test/test_api.rb +59 -19
  31. data/test/test_cli.rb +1 -1
  32. data/test/test_client.rb +44 -5
  33. data/test/test_exception_handler.rb +4 -87
  34. data/test/test_middleware.rb +3 -2
  35. data/test/test_redis_connection.rb +0 -6
  36. data/test/test_retry.rb +13 -68
  37. data/test/test_scheduled.rb +1 -1
  38. data/test/test_scheduling.rb +5 -0
  39. data/test/test_sidekiq.rb +18 -0
  40. data/test/test_web.rb +98 -58
  41. data/web/assets/stylesheets/application.css +5 -0
  42. data/web/locales/cs.yml +68 -0
  43. data/web/locales/da.yml +9 -1
  44. data/web/locales/de.yml +15 -7
  45. data/web/locales/el.yml +68 -0
  46. data/web/locales/en.yml +8 -3
  47. data/web/locales/es.yml +9 -1
  48. data/web/locales/fr.yml +34 -26
  49. data/web/locales/it.yml +26 -18
  50. data/web/locales/ja.yml +8 -2
  51. data/web/locales/ko.yml +0 -2
  52. data/web/locales/nl.yml +8 -3
  53. data/web/locales/no.yml +9 -3
  54. data/web/locales/pl.yml +0 -1
  55. data/web/locales/pt-br.yml +11 -4
  56. data/web/locales/pt.yml +8 -1
  57. data/web/locales/ru.yml +29 -22
  58. data/web/locales/sv.yml +68 -0
  59. data/web/locales/zh-tw.yml +68 -0
  60. data/web/views/_job_info.erb +8 -2
  61. data/web/views/_summary.erb +13 -7
  62. data/web/views/busy.erb +55 -0
  63. data/web/views/dead.erb +30 -0
  64. data/web/views/layout.erb +1 -0
  65. data/web/views/morgue.erb +66 -0
  66. metadata +29 -30
  67. data/config.ru +0 -18
  68. data/lib/sidekiq/capistrano.rb +0 -5
  69. data/lib/sidekiq/capistrano2.rb +0 -54
  70. data/lib/sidekiq/tasks/sidekiq.rake +0 -119
  71. data/lib/sidekiq/yaml_patch.rb +0 -21
  72. data/test/test_util.rb +0 -18
  73. data/web/views/_workers.erb +0 -22
  74. data/web/views/workers.erb +0 -16
@@ -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
@@ -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
@@ -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>
@@ -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 %>