resque 2.5.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0153ab38ce4b063a60d22d1a0629e590baa6658e514fd369394982e6ce2ad2cd
4
- data.tar.gz: a86e978107b5ca99bc97df0a6a6ec718e64f4dcfe3816d7fab08885ebb49b070
3
+ metadata.gz: 7419ce3cc8734b05527a47b0c5fb4a9eea0a5d33265a6e3214bb429980c37681
4
+ data.tar.gz: 4216e18e121883e0350275e00c19e1d6c6f0965915d4b48a8a0a29f07e652317
5
5
  SHA512:
6
- metadata.gz: 93877c6bb80781a7d8d53c2697ea8c87bcddf2fc38addc49f6f05e7d3ab1a243a23de7c4bd29c0f14b575535a62f721313f8968150bf863af852237d15715cee
7
- data.tar.gz: 7483844c869aaee817b2dd064e1b9dd3c7f7ab451ee2a8b73dfbb45f14e7b70de3981ac75a6290b526728797513557523ee015c644875ba5d4a6fc23f261e097
6
+ metadata.gz: 7301e154b368d012161ae22d69cb8e4400977a3099392f7789369ca37b04a413d0abec092e60dd9dddee01bda81c55dbf182da5cede4a8c2beff94f8ed44bc94
7
+ data.tar.gz: 85d0c05d98502b0da28ae60ca6117d3b4a47bbfc981b48c4168f6bf727bac8c4c325dcebf604f8916d0e04c97bf933651b6077b55ead117e7ecb1cc2cf4655f0
data/HISTORY.md CHANGED
@@ -1,3 +1,24 @@
1
+ ## 2.7.0
2
+
3
+ ### Fixed
4
+ * Update README.markdown (#1891)
5
+ * Ruby does not allow logging within trap handlers (#1729)
6
+ * Fix typo in stat.rb warning: data_strore -> data_store (#1904)
7
+ * Ensure ruby 3.3 compatibility (#1907)
8
+
9
+ ## 2.6.0
10
+
11
+ ### Fixed
12
+
13
+ * resque-web: Fix reflected XSS in queues endpoint (#1865)
14
+ * resque-web: Format args in YAML (#1875)
15
+ * Fix MiniTest undefined errors (#1879)
16
+ * Fix failing reconnect tests (#1880)
17
+
18
+ ### Added
19
+
20
+ * Documents how to make the worker shutdown when the queue is empty (#1873)
21
+
1
22
  ## 2.5.0
2
23
 
3
24
  ### Fixed
data/README.markdown CHANGED
@@ -133,6 +133,15 @@ require 'your/app' # Include this line if you want your workers to have access t
133
133
 
134
134
  #### Rails
135
135
 
136
+ ##### Rails 7.1
137
+
138
+ If you're using Rails 7.1.x, use [rack-session version 1.0.2](https://rubygems.org/gems/rack-session/versions/1.0.2). This is because resque-web's dependency, [Sinatra, isn't compatible with rack 3.0](https://github.com/sinatra/sinatra/issues/1797), which is [required by rack-session 2.0.0](https://rubygems.org/gems/rack-session/versions/2.0.0).
139
+
140
+ ```
141
+ gem 'rails', '~> 7.1'
142
+ gem 'rack-session', '~> 1.0', '>= 1.0.2'
143
+ ```
144
+
136
145
  To make resque specific changes, you can override the `resque:setup` job in `lib/tasks` (ex: `lib/tasks/resque.rake`). GitHub's setup task looks like this:
137
146
 
138
147
  ``` ruby
@@ -258,6 +267,9 @@ The default is 5 seconds, but for a semi-active app you may want to use a smalle
258
267
 
259
268
  $ INTERVAL=0.1 QUEUE=file_serve rake resque:work
260
269
 
270
+ When INTERVAL is set to 0 it will run until the queue is empty and then
271
+ shutdown the worker, instead of waiting for new jobs.
272
+
261
273
  The Front End
262
274
  -------------
263
275
 
@@ -3,7 +3,7 @@
3
3
  <% if current_queue = params[:id] %>
4
4
 
5
5
  <h1>Pending jobs on <span class='hl'><%= h escape_html(current_queue) %></span></h1>
6
- <form method="POST" action="<%=u "/queues/#{current_queue}/remove" %>" class='remove-queue'>
6
+ <form method="POST" action="<%=u "/queues/#{escape_html(current_queue)}/remove" %>" class='remove-queue'>
7
7
  <input type='submit' name='' value='Remove Queue' class="confirmSubmission" />
8
8
  </form>
9
9
  <p class='sub'><%= page_entries_info start = params[:start].to_i, start + 19, size = resque.size(current_queue), 'job' %></p>
@@ -21,7 +21,7 @@
21
21
  <td>
22
22
  <code><%= payload.key?('class') ? payload['class'] : "—" %></code>
23
23
  </td>
24
- <td><%=h payload.key?('args') ? payload['args'].inspect : "—" %></td>
24
+ <td><pre><%=h payload.key?('args') ? show_args(payload['args']) : "—" %></pre></td>
25
25
  </tr>
26
26
  </table>
27
27
 
data/lib/resque/stat.rb CHANGED
@@ -9,7 +9,7 @@ module Resque
9
9
  extend self
10
10
 
11
11
  def redis
12
- warn '[Resque] [Deprecation] Resque::Stat #redis method is deprecated (please use #data_strore)'
12
+ warn '[Resque] [Deprecation] Resque::Stat #redis method is deprecated (please use #data_store)'
13
13
  data_store
14
14
  end
15
15
 
@@ -1,3 +1,3 @@
1
1
  module Resque
2
- VERSION = '2.5.0'
2
+ VERSION = '2.7.0'
3
3
  end
data/lib/resque/worker.rb CHANGED
@@ -585,14 +585,16 @@ module Resque
585
585
  # Stop processing jobs after the current one has completed (if we're
586
586
  # currently running one).
587
587
  def pause_processing
588
- log_with_severity :info, "USR2 received; pausing job processing"
588
+ _, self_write = IO.pipe
589
+ self_write.puts "USR2 received; pausing job processing"
589
590
  run_hook :before_pause, self
590
591
  @paused = true
591
592
  end
592
593
 
593
594
  # Start processing jobs again after a pause
594
595
  def unpause_processing
595
- log_with_severity :info, "CONT received; resuming job processing"
596
+ _, self_write = IO.pipe
597
+ self_write.puts "CONT received; resuming job processing"
596
598
  @paused = false
597
599
  run_hook :after_pause, self
598
600
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Wanstrath
8
8
  - Steve Klabnik
9
9
  - Terence Lee
10
10
  - Michael Bianco
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-03-01 00:00:00.000000000 Z
14
+ date: 2024-12-30 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: redis-namespace
@@ -61,14 +61,14 @@ dependencies:
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: '1.0'
64
+ version: '1'
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: '1.0'
71
+ version: '1'
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: thin
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -186,7 +186,7 @@ licenses:
186
186
  metadata:
187
187
  changelog_uri: https://github.com/resque/resque/blob/master/HISTORY.md
188
188
  rubygems_mfa_required: 'true'
189
- post_install_message:
189
+ post_install_message:
190
190
  rdoc_options:
191
191
  - "--charset=UTF-8"
192
192
  require_paths:
@@ -202,8 +202,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
202
202
  - !ruby/object:Gem::Version
203
203
  version: '0'
204
204
  requirements: []
205
- rubygems_version: 3.4.1
206
- signing_key:
205
+ rubygems_version: 3.0.3.1
206
+ signing_key:
207
207
  specification_version: 4
208
208
  summary: Resque is a Redis-backed queueing system.
209
209
  test_files: []