sidekiq-pauzer 5.2.0 → 6.0.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 98787fef3e8c9b2177b4d60ddff1c6f5cd9183bd574581606b545f3415073b8f
4
- data.tar.gz: b9d2a052d852cf0b44d07bafd4162dbe76170d14586614a5fe7b5123d39e6513
3
+ metadata.gz: 05b340fb4b830a876ed4918d692d1fe0e8853d6749e0bf6adf3a68cd040505c7
4
+ data.tar.gz: 32fc2b2569337b0831df884d59cff29778e5b40492f28ec7cf0c6c6d6b04782f
5
5
  SHA512:
6
- metadata.gz: ba93ae7964585e0a89692ba06143704c52d45854ae51df91e7ff3cbe6596cae3ad1e58f505b352bf2f5abc35e4e9854c3a54294d7dbb5f6862698d34fb92057b
7
- data.tar.gz: 978230c92240e7762db583e1854bcecdaa61496167ffb14d5f92dffcff655bb618566919a915b3c26e94ca2daba0ecd482a6da94d5ae67f6847903ba038ee632
6
+ metadata.gz: 3c45cbb931597c2a5a0b07a313f78186fea626516e0f4d56e656d727962c0b5d46a09eee48018a5cb3d42329a8a591ae18eb901f3bafe9447a57fdc5b7d0f6f6
7
+ data.tar.gz: 1f252e840204e00288476ca8de71074550c9b5d054bf9767ae5b3c1f8bc1f02a86d97c360cb8bd2cbf3598f2df47ab43296ff9d67d9fd48e1ac6d186e017925f
data/README.adoc CHANGED
@@ -82,15 +82,12 @@ NOTE: If you are using custom Sidekiq views path, then you will need to call
82
82
  This library aims to support and is tested against:
83
83
 
84
84
  * https://www.ruby-lang.org[Ruby]
85
- ** MRI 3.0.x
86
- ** MRI 3.1.x
87
85
  ** MRI 3.2.x
88
86
  ** MRI 3.3.x
87
+ ** MRI 3.4.x
89
88
  * https://github.com/sidekiq/sidekiq[Sidekiq]
90
- ** 7.2.x
91
- ** 7.3.x
89
+ ** 8.0.0
92
90
  * https://redis.io[Redis]
93
- ** 6.2.x
94
91
  ** 7.0.x
95
92
  ** 7.2.x
96
93
 
@@ -17,7 +17,7 @@ module Sidekiq
17
17
  def apply!
18
18
  revert!
19
19
 
20
- Sidekiq::WebAction.class_eval <<-RUBY, __FILE__, __LINE__ + 1 # rubocop:disable Style/DocumentDynamicEvalDefinition
20
+ Sidekiq::Web::Action.class_eval <<-RUBY, __FILE__, __LINE__ + 1 # rubocop:disable Style/DocumentDynamicEvalDefinition
21
21
  def _erb_queues
22
22
  #{PAUZER_QUEUES_TEMPLATE}
23
23
  end
@@ -25,7 +25,7 @@ module Sidekiq
25
25
  end
26
26
 
27
27
  def revert!
28
- Sidekiq::WebAction.remove_method(:_erb_queues) if Sidekiq::WebAction.method_defined?(:_erb_queues)
28
+ Sidekiq::Web::Action.remove_method(:_erb_queues) if Sidekiq::Web::Action.method_defined?(:_erb_queues)
29
29
  end
30
30
  end
31
31
  end
@@ -17,20 +17,20 @@ module Sidekiq
17
17
  private
18
18
 
19
19
  def remove_theirs_queue_update_route
20
- Sidekiq::WebApplication
21
- .instance_variable_get(:@routes)
22
- .fetch(Sidekiq::WebRouter::POST)
20
+ Sidekiq::Web::Application
21
+ .route_cache
22
+ .fetch(:post)
23
23
  .delete_if { |route| route.pattern == "/queues/:name" }
24
24
  end
25
25
 
26
26
  def register_ours_queue_update_route # rubocop:disable Metrics/MethodLength
27
- Sidekiq::WebApplication.class_exec do
27
+ Sidekiq::Web::Application.class_exec do
28
28
  post "/queues/:name" do
29
- queue = Sidekiq::Queue.new(route_params[:name])
29
+ queue = Sidekiq::Queue.new(route_params(:name))
30
30
 
31
- if params["pause"]
31
+ if request.params["pause"]
32
32
  queue.pause!
33
- elsif params["unpause"]
33
+ elsif request.params["unpause"]
34
34
  queue.unpause!
35
35
  else
36
36
  queue.clear
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sidekiq
4
4
  module Pauzer
5
- VERSION = "5.2.0"
5
+ VERSION = "6.0.0"
6
6
  end
7
7
  end
data/web/views/queues.erb CHANGED
@@ -1,44 +1,46 @@
1
1
  <!-- sidekiq-pauzer <%= Sidekiq::Pauzer::VERSION %> -->
2
2
 
3
- <div class="header-container">
4
- <h1><%= t('Queues') %></h1>
5
- </div>
6
-
7
- <div class="table_container">
8
- <table class="queues table table-hover table-bordered table-striped">
9
- <thead>
10
- <th><%= t('Queue') %></th>
11
- <th><%= t('Size') %></th>
12
- <th><%= t('Latency') %></th>
13
- <th><%= t('Actions') %></th>
14
- </thead>
15
- <% @queues.each do |queue| %>
16
- <tr>
17
- <td>
18
- <a href="<%= root_path %>queues/<%= CGI.escape(queue.name) %>"><%= h queue.name %></a>
19
- <% if queue.paused? %>
20
- <span class="label label-danger"><%= t('Paused') %></span>
21
- <% end %>
22
- </td>
23
- <td class="num"><%= number_with_delimiter(queue.size) %> </td>
24
- <td class="num">
25
- <% queue_latency = queue.latency %>
26
- <%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %>
27
- <%= number_with_delimiter(queue_latency, precision: 2) %>
28
- </td>
29
- <td class="delete-confirm">
30
- <form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
31
- <%= csrf_tag %>
32
- <input class="btn btn-danger" type="submit" name="delete" title="This will delete all jobs within the queue, it will reappear if you push more jobs to it in the future." value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
3
+ <section>
4
+ <header>
5
+ <h1><%= t('Queues') %></h1>
6
+ </header>
33
7
 
8
+ <div class="table_container">
9
+ <table>
10
+ <thead>
11
+ <th><%= t('Queue') %></th>
12
+ <th><%= t('Size') %></th>
13
+ <th><%= t('Latency') %></th>
14
+ <th><%= t('Actions') %></th>
15
+ </thead>
16
+ <% @queues.each do |queue| %>
17
+ <tr>
18
+ <td>
19
+ <a href="<%= root_path %>queues/<%= CGI.escape(queue.name) %>"><%= h queue.name %></a>
34
20
  <% if queue.paused? %>
35
- <input class="btn btn-danger" type="submit" name="unpause" value="<%= t('Unpause') %>" />
36
- <% else %>
37
- <input class="btn btn-danger" type="submit" name="pause" value="<%= t('Pause') %>" />
21
+ <span class="label label-danger"><%= t('Paused') %></span>
38
22
  <% end %>
39
- </form>
40
- </td>
41
- </tr>
42
- <% end %>
43
- </table>
44
- </div>
23
+ </td>
24
+ <td class="num"><%= number_with_delimiter(queue.size) %> </td>
25
+ <td class="num">
26
+ <% queue_latency = queue.latency %>
27
+ <%= (queue_latency < 60) ? '' : " (#{relative_time(Time.at(Time.now.to_f - queue_latency))})" %>
28
+ <%= number_with_delimiter(queue_latency, precision: 2) %>
29
+ </td>
30
+ <td class="delete-confirm">
31
+ <form action="<%=root_path %>queues/<%= CGI.escape(queue.name) %>" method="post">
32
+ <%= csrf_tag %>
33
+ <input class="btn btn-danger" type="submit" name="delete" title="This will delete all jobs within the queue, it will reappear if you push more jobs to it in the future." value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSureDeleteQueue', :queue => h(queue.name)) %>" />
34
+
35
+ <% if queue.paused? %>
36
+ <input class="btn btn-danger" type="submit" name="unpause" value="<%= t('Unpause') %>" />
37
+ <% else %>
38
+ <input class="btn btn-danger" type="submit" name="pause" value="<%= t('Pause') %>" />
39
+ <% end %>
40
+ </form>
41
+ </td>
42
+ </tr>
43
+ <% end %>
44
+ </table>
45
+ </div>
46
+ </section>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-pauzer
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Zapparov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-11-22 00:00:00.000000000 Z
11
+ date: 2025-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '7.2'
33
+ version: '8.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '7.2'
40
+ version: '8.0'
41
41
  description:
42
42
  email:
43
43
  - alexey@zapparov.com
@@ -64,9 +64,9 @@ licenses:
64
64
  - MIT
65
65
  metadata:
66
66
  homepage_uri: https://github.com/ixti/sidekiq-pauzer
67
- source_code_uri: https://github.com/ixti/sidekiq-pauzer/tree/v5.2.0
67
+ source_code_uri: https://github.com/ixti/sidekiq-pauzer/tree/v6.0.0
68
68
  bug_tracker_uri: https://github.com/ixti/sidekiq-pauzer/issues
69
- changelog_uri: https://github.com/ixti/sidekiq-pauzer/blob/v5.2.0/CHANGES.md
69
+ changelog_uri: https://github.com/ixti/sidekiq-pauzer/blob/v6.0.0/CHANGES.md
70
70
  rubygems_mfa_required: 'true'
71
71
  post_install_message:
72
72
  rdoc_options: []
@@ -76,14 +76,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: '3.0'
79
+ version: '3.2'
80
80
  required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
84
  version: '0'
85
85
  requirements: []
86
- rubygems_version: 3.5.22
86
+ rubygems_version: 3.4.19
87
87
  signing_key:
88
88
  specification_version: 4
89
89
  summary: Enhance Sidekiq with queue pausing