sidekiq 8.1.1 → 8.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +27 -2
  3. data/README.md +1 -1
  4. data/bin/kiq +17 -0
  5. data/lib/active_job/queue_adapters/sidekiq_adapter.rb +8 -8
  6. data/lib/sidekiq/api.rb +46 -35
  7. data/lib/sidekiq/capsule.rb +0 -1
  8. data/lib/sidekiq/cli.rb +1 -1
  9. data/lib/sidekiq/client.rb +3 -1
  10. data/lib/sidekiq/component.rb +3 -0
  11. data/lib/sidekiq/config.rb +1 -1
  12. data/lib/sidekiq/launcher.rb +1 -1
  13. data/lib/sidekiq/manager.rb +1 -1
  14. data/lib/sidekiq/paginator.rb +6 -1
  15. data/lib/sidekiq/profiler.rb +1 -1
  16. data/lib/sidekiq/scheduled.rb +2 -5
  17. data/lib/sidekiq/tui/controls.rb +53 -0
  18. data/lib/sidekiq/tui/filtering.rb +53 -0
  19. data/lib/sidekiq/tui/tabs/base_tab.rb +187 -0
  20. data/lib/sidekiq/tui/tabs/busy.rb +118 -0
  21. data/lib/sidekiq/tui/tabs/dead.rb +19 -0
  22. data/lib/sidekiq/tui/tabs/home.rb +144 -0
  23. data/lib/sidekiq/tui/tabs/metrics.rb +131 -0
  24. data/lib/sidekiq/tui/tabs/queues.rb +95 -0
  25. data/lib/sidekiq/tui/tabs/retries.rb +19 -0
  26. data/lib/sidekiq/tui/tabs/scheduled.rb +19 -0
  27. data/lib/sidekiq/tui/tabs/set_tab.rb +96 -0
  28. data/lib/sidekiq/tui/tabs.rb +15 -0
  29. data/lib/sidekiq/tui.rb +274 -913
  30. data/lib/sidekiq/version.rb +1 -1
  31. data/lib/sidekiq/web/helpers.rb +32 -3
  32. data/lib/sidekiq.rb +1 -1
  33. data/sidekiq.gemspec +1 -1
  34. data/web/assets/stylesheets/style.css +2 -0
  35. data/web/locales/ar.yml +1 -1
  36. data/web/locales/fa.yml +1 -1
  37. data/web/locales/gd.yml +1 -1
  38. data/web/locales/he.yml +1 -1
  39. data/web/locales/pt-BR.yml +1 -1
  40. data/web/locales/ur.yml +1 -1
  41. data/web/locales/zh-TW.yml +1 -1
  42. data/web/views/_paging.html.erb +1 -1
  43. metadata +15 -2
  44. data/bin/tui +0 -5
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sidekiq
4
- VERSION = "8.1.1"
4
+ VERSION = "8.1.3"
5
5
  MAJOR = 8
6
6
 
7
7
  def self.gem_version
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "uri"
4
- require "yaml"
5
4
  require "cgi/escape"
6
5
 
7
6
  module Sidekiq
@@ -73,12 +72,42 @@ module Sidekiq
73
72
  # so extensions can be localized
74
73
  @@strings[lang] ||= config.locales.each_with_object({}) do |path, global|
75
74
  find_locale_files(lang).each do |file|
76
- strs = YAML.safe_load_file(file)
75
+ strs = parse_yaml_new(file)
77
76
  global.merge!(strs[lang])
78
77
  end
79
78
  end
80
79
  end
81
80
 
81
+ def parse_yaml_old(path)
82
+ require "yaml"
83
+ YAML.safe_load_file(path)
84
+ end
85
+
86
+ def parse_yaml_new(path)
87
+ locale = nil
88
+ map = {}
89
+ IO.readlines(path, chomp: true).each do |line|
90
+ case line
91
+ when /\A\s*\#.*/
92
+ # line comment
93
+ when !locale && /\A([a-zA-Z\-_]+):/
94
+ locale = $1
95
+ map[locale] = {}
96
+ when /\A\s+(\w+):\s+(.+)\z/
97
+ # A few values have double quotes to include special characters in YAML.
98
+ # Strip them off manually as our greedy match will include them.
99
+ key = $1
100
+ s = $2
101
+ s = s[1..] if s[0] == "\""
102
+ s = s[0..-2] if s[-1] == "\""
103
+ map[locale][key] = s
104
+ else
105
+ raise ArgumentError, "unable to parse #{path}: #{line}"
106
+ end
107
+ end
108
+ map
109
+ end
110
+
82
111
  def to_json(x)
83
112
  Sidekiq.dump_json(x)
84
113
  end
@@ -294,7 +323,7 @@ module Sidekiq
294
323
  else
295
324
  # DEPRECATED Backwards compatibility with older processes.
296
325
  # 'capsules' element added in v8.0.9
297
- process.queues.join(", ")
326
+ pro.queues.join(", ")
298
327
  end
299
328
  end
300
329
 
data/lib/sidekiq.rb CHANGED
@@ -48,7 +48,7 @@ module Sidekiq
48
48
  end
49
49
 
50
50
  def self.testing!(mode = :fake, &block)
51
- raise "Unknown testing mode: #{mode}" unless %i[fake disabled inline].include?(mode)
51
+ raise "Unknown testing mode: #{mode}" unless %i[fake disable inline].include?(mode)
52
52
 
53
53
  require "sidekiq/test_api"
54
54
  Sidekiq::Testing.__set_test_mode(mode, &block)
data/sidekiq.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.homepage = "https://sidekiq.org"
9
9
  gem.license = "LGPL-3.0"
10
10
 
11
- gem.executables = ["sidekiq", "sidekiqmon"]
11
+ gem.executables = ["sidekiq", "sidekiqmon", "kiq"]
12
12
  gem.files = %w[sidekiq.gemspec README.md Changes.md LICENSE.txt] + `git ls-files | grep -E '^(bin|lib|web)'`.split("\n")
13
13
  gem.name = "sidekiq"
14
14
  gem.version = Sidekiq::VERSION
@@ -534,6 +534,8 @@ input[type="checkbox"] { accent-color: var(--color-primary); }
534
534
 
535
535
  .pagination a { text-decoration: none; }
536
536
 
537
+ .pagination .active a { color: var(--color-primary); font-weight: 700; }
538
+
537
539
  .pagination .disabled { opacity: 0.3; }
538
540
 
539
541
  div:has(.pagination.pull-right) { margin-left: auto; }
data/web/locales/ar.yml CHANGED
@@ -74,7 +74,7 @@ ar:
74
74
  Stop: إيقاف
75
75
  StopAll: إيقاف الكل
76
76
  StopPolling: إيقاف الاستعلامات
77
- TextDirection: 'rtl'
77
+ TextDirection: rtl
78
78
  Thread: نيسب
79
79
  Threads: نياسب
80
80
  ThreeMonths: ثلاثة أشهر
data/web/locales/fa.yml CHANGED
@@ -69,7 +69,7 @@ fa:
69
69
  Stop: توقف
70
70
  StopAll: توقف همه
71
71
  StopPolling: Stop Polling
72
- TextDirection: 'rtl'
72
+ TextDirection: rtl
73
73
  Thread: رشته
74
74
  Threads: رشته ها
75
75
  ThreeMonths: ۳ ماه
data/web/locales/gd.yml CHANGED
@@ -1,4 +1,4 @@
1
- # elements like %{queue} are variables and should not be translated
1
+ # elements like %{queue} are variables and should not be translated
2
2
  gd:
3
3
  LanguageName: Gaeilge
4
4
  Actions: Gnìomhan
data/web/locales/he.yml CHANGED
@@ -69,7 +69,7 @@ he:
69
69
  Stop: עצור
70
70
  StopAll: עצור הכל
71
71
  StopPolling: עצור תשאול
72
- TextDirection: 'rtl'
72
+ TextDirection: rtl
73
73
  Thread: חוט
74
74
  Threads: חוטים
75
75
  ThreeMonths: 3 חדשים
@@ -1,4 +1,4 @@
1
- "pt-BR":
1
+ pt-BR:
2
2
  LanguageName: Português (Brasil)
3
3
  Actions: Ações
4
4
  AddToQueue: Adicionar à fila
data/web/locales/ur.yml CHANGED
@@ -69,7 +69,7 @@ ur:
69
69
  Stop: بند کرو
70
70
  StopAll: ﺗﻤﺎﻡ ﺑﻨﺪ کﺭﻭ
71
71
  StopPolling: ﺑﺮاﮦ ﺭاﺳﺖ روکيے
72
- TextDirection: 'rtl'
72
+ TextDirection: rtl
73
73
  Thread: موضوع
74
74
  Threads: موضوع
75
75
  ThreeMonths: تین ماہ
@@ -1,6 +1,6 @@
1
1
  # elements like %{queue} are variables and should not be translated
2
2
  zh-TW: # <---- change this to your locale code
3
- LanguageName: 臺灣話
3
+ LanguageName: 繁體中文
4
4
  Dashboard: 資訊主頁
5
5
  Status: 狀態
6
6
  Time: 時間
@@ -10,7 +10,7 @@
10
10
  <a href="<%= url %>?<%= qparams(page: @current_page - 1) %>"><%= @current_page - 1 %></a>
11
11
  </li>
12
12
  <% end %>
13
- <li class="disabled">
13
+ <li class="active">
14
14
  <a href="<%= url %>?<%= qparams(page: @current_page) %>"><%= @current_page %></a>
15
15
  </li>
16
16
  <% if @total_size > @current_page * @count %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.1
4
+ version: 8.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
@@ -83,6 +83,7 @@ description: Simple, efficient background processing for Ruby.
83
83
  email:
84
84
  - info@contribsys.com
85
85
  executables:
86
+ - kiq
86
87
  - sidekiq
87
88
  - sidekiqmon
88
89
  extensions: []
@@ -91,12 +92,12 @@ files:
91
92
  - Changes.md
92
93
  - LICENSE.txt
93
94
  - README.md
95
+ - bin/kiq
94
96
  - bin/lint-herb
95
97
  - bin/multi_queue_bench
96
98
  - bin/sidekiq
97
99
  - bin/sidekiqload
98
100
  - bin/sidekiqmon
99
- - bin/tui
100
101
  - bin/webload
101
102
  - lib/active_job/queue_adapters/sidekiq_adapter.rb
102
103
  - lib/generators/sidekiq/job_generator.rb
@@ -150,6 +151,18 @@ files:
150
151
  - lib/sidekiq/testing/inline.rb
151
152
  - lib/sidekiq/transaction_aware_client.rb
152
153
  - lib/sidekiq/tui.rb
154
+ - lib/sidekiq/tui/controls.rb
155
+ - lib/sidekiq/tui/filtering.rb
156
+ - lib/sidekiq/tui/tabs.rb
157
+ - lib/sidekiq/tui/tabs/base_tab.rb
158
+ - lib/sidekiq/tui/tabs/busy.rb
159
+ - lib/sidekiq/tui/tabs/dead.rb
160
+ - lib/sidekiq/tui/tabs/home.rb
161
+ - lib/sidekiq/tui/tabs/metrics.rb
162
+ - lib/sidekiq/tui/tabs/queues.rb
163
+ - lib/sidekiq/tui/tabs/retries.rb
164
+ - lib/sidekiq/tui/tabs/scheduled.rb
165
+ - lib/sidekiq/tui/tabs/set_tab.rb
153
166
  - lib/sidekiq/version.rb
154
167
  - lib/sidekiq/web.rb
155
168
  - lib/sidekiq/web/action.rb
data/bin/tui DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative "../lib/sidekiq/tui"
4
-
5
- Sidekiq::TUI.new.run