resque 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of resque might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/HISTORY.md +14 -2
- data/lib/resque/data_store.rb +3 -2
- data/lib/resque/failure.rb +6 -0
- data/lib/resque/server/helpers.rb +3 -1
- data/lib/resque/server/views/failed.erb +6 -0
- data/lib/resque/server/views/layout.erb +1 -1
- data/lib/resque/server.rb +5 -0
- data/lib/resque/version.rb +1 -1
- data/lib/resque/worker.rb +2 -2
- data/lib/resque.rb +1 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b6f395169f58a51122135f8cbf6495ca914a472a94038277d6d022ac1387459a
|
4
|
+
data.tar.gz: ba5b39c8521b48b0f882c2290d105dc8b2db24308cf08d14d630841ed45585ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f03920bbf92a185a5d6c062d9d10dbc17c8b3090ed9bbd04138e85b3a40f0cefa377c21f22a343c3c9b64cd3502998efa5b42f5a6f6c7f314712ceb54bc9671e
|
7
|
+
data.tar.gz: af2ac4eb41bd9dc30951fd1122deada0b445000736ff08a020313e4337655c61e79af888e7b21e3c6c1cacab2e3bc5cc1f4d28577d2e2e02e62c5f8bf3452a18
|
data/HISTORY.md
CHANGED
@@ -1,15 +1,27 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
-
###
|
3
|
+
### Fixed
|
4
4
|
|
5
5
|
*
|
6
6
|
*
|
7
7
|
|
8
|
-
###
|
8
|
+
### Added
|
9
9
|
|
10
10
|
*
|
11
11
|
*
|
12
12
|
|
13
|
+
## 2.2.0
|
14
|
+
|
15
|
+
### Added
|
16
|
+
|
17
|
+
* Add 'Retry Failed Jobs' button to Failed page
|
18
|
+
|
19
|
+
### Fixed
|
20
|
+
|
21
|
+
* Loading railtie when it did not exist #1765
|
22
|
+
* Fix closing parent Redis connection in child process after fork
|
23
|
+
* Fix the failed queues list on /queues UI when the RedisMultiQueue backend is used #1638
|
24
|
+
|
13
25
|
## 2.1.0
|
14
26
|
|
15
27
|
### Security
|
data/lib/resque/data_store.rb
CHANGED
@@ -76,9 +76,10 @@ module Resque
|
|
76
76
|
@redis.inspect
|
77
77
|
end
|
78
78
|
|
79
|
-
# Force a reconnect to Redis
|
79
|
+
# Force a reconnect to Redis without closing the connection in the parent
|
80
|
+
# process after a fork.
|
80
81
|
def reconnect
|
81
|
-
@redis._client.
|
82
|
+
@redis._client.connect
|
82
83
|
end
|
83
84
|
|
84
85
|
# Returns an array of all known Resque keys in Redis. Redis' KEYS operation
|
data/lib/resque/failure.rb
CHANGED
@@ -9,7 +9,9 @@ Resque::Server.helpers do
|
|
9
9
|
|
10
10
|
def failed_multiple_queues?
|
11
11
|
return @multiple_failed_queues if defined?(@multiple_failed_queues)
|
12
|
-
|
12
|
+
|
13
|
+
@multiple_failed_queues = Resque::Failure.queues.size > 1 ||
|
14
|
+
(defined?(Resque::Failure::RedisMultiQueue) && Resque::Failure.backend == Resque::Failure::RedisMultiQueue)
|
13
15
|
end
|
14
16
|
|
15
17
|
def failed_size
|
@@ -8,6 +8,12 @@
|
|
8
8
|
<form method="POST" action="<%= u "failed#{'/' + params[:queue] if params[:queue]}/clear" %>">
|
9
9
|
<input type="submit" name="" value="Clear <%= params[:queue] ? "'#{params[:queue]}'" : 'Failed' %> Jobs" class="confirmSubmission" />
|
10
10
|
</form>
|
11
|
+
|
12
|
+
<% unless params[:queue] %>
|
13
|
+
<form method="POST" action="<%= u "failed/clear_retried" %>">
|
14
|
+
<input type="submit" name="" value="Clear Retried Jobs" onclick='return confirm("Are you absolutely sure? This cannot be undone.");' />
|
15
|
+
</form>
|
16
|
+
<% end %>
|
11
17
|
<form method="POST" action="<%= u "failed#{'/' + params[:queue] if params[:queue]}/requeue/all" %>">
|
12
18
|
<input type="submit" name="" value="Retry <%= params[:queue] ? "'#{params[:queue]}'" : 'Failed' %> Jobs" class="confirmSubmission" />
|
13
19
|
</form>
|
@@ -37,7 +37,7 @@
|
|
37
37
|
</div>
|
38
38
|
|
39
39
|
<div id="footer">
|
40
|
-
<p>Powered by <a href="http://github.com/resque/resque">Resque</a> v<%=Resque::
|
40
|
+
<p>Powered by <a href="http://github.com/resque/resque">Resque</a> v<%=Resque::VERSION%></p>
|
41
41
|
<p>Connected to Redis namespace <%= Resque.redis.namespace %> on <%=Resque.redis_id%></p>
|
42
42
|
</div>
|
43
43
|
|
data/lib/resque/server.rb
CHANGED
@@ -205,6 +205,11 @@ module Resque
|
|
205
205
|
redirect u('failed')
|
206
206
|
end
|
207
207
|
|
208
|
+
post "/failed/clear_retried" do
|
209
|
+
Resque::Failure.clear_retried
|
210
|
+
redirect u('failed')
|
211
|
+
end
|
212
|
+
|
208
213
|
post "/failed/:queue/clear" do
|
209
214
|
Resque::Failure.clear params[:queue]
|
210
215
|
redirect u('failed')
|
data/lib/resque/version.rb
CHANGED
data/lib/resque/worker.rb
CHANGED
@@ -852,7 +852,7 @@ module Resque
|
|
852
852
|
`ps -A -o pid,comm | grep "[r]uby" | grep -v "resque-web"`.split("\n").map do |line|
|
853
853
|
real_pid = line.split(' ')[0]
|
854
854
|
pargs_command = `pargs -a #{real_pid} 2>/dev/null | grep [r]esque | grep -v "resque-web"`
|
855
|
-
if pargs_command.split(':')[1] == " resque-#{Resque::
|
855
|
+
if pargs_command.split(':')[1] == " resque-#{Resque::VERSION}"
|
856
856
|
real_pid
|
857
857
|
end
|
858
858
|
end.compact
|
@@ -862,7 +862,7 @@ module Resque
|
|
862
862
|
# Procline is always in the format of:
|
863
863
|
# RESQUE_PROCLINE_PREFIXresque-VERSION: STRING
|
864
864
|
def procline(string)
|
865
|
-
$0 = "#{ENV['RESQUE_PROCLINE_PREFIX']}resque-#{Resque::
|
865
|
+
$0 = "#{ENV['RESQUE_PROCLINE_PREFIX']}resque-#{Resque::VERSION}: #{string}"
|
866
866
|
log_with_severity :debug, $0
|
867
867
|
end
|
868
868
|
|
data/lib/resque.rb
CHANGED
metadata
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resque
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Wanstrath
|
8
8
|
- Steve Klabnik
|
9
9
|
- Terence Lee
|
10
|
+
- Michael Bianco
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date: 2021-
|
14
|
+
date: 2021-11-04 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: redis-namespace
|
@@ -165,10 +166,11 @@ files:
|
|
165
166
|
- lib/resque/worker.rb
|
166
167
|
- lib/tasks/redis.rake
|
167
168
|
- lib/tasks/resque.rake
|
168
|
-
homepage:
|
169
|
+
homepage: https://github.com/resque/resque
|
169
170
|
licenses:
|
170
171
|
- MIT
|
171
|
-
metadata:
|
172
|
+
metadata:
|
173
|
+
changelog_uri: https://github.com/resque/resque/blob/master/HISTORY.md
|
172
174
|
post_install_message:
|
173
175
|
rdoc_options:
|
174
176
|
- "--charset=UTF-8"
|