delayed_job_web 1.2.9 → 1.2.10
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of delayed_job_web might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.markdown +1 -1
- data/delayed_job_web.gemspec +1 -1
- data/lib/delayed_job_web/application/app.rb +5 -3
- data/lib/delayed_job_web/application/views/failed.erb +1 -1
- data/lib/delayed_job_web/application/views/pending.erb +1 -1
- data/test/lib/delayed_job_web/application/test_app.rb +23 -2
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbcba0ad96175e81e6fae7a52cf978605d65e2c6
|
4
|
+
data.tar.gz: f3065d7b9dea29396b9f9727c4391e464f4b2737
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dfeb2edec1976930a999cc798de7d00facfce2bb024d10c7e32877f83553ec50fb3c8fbb7b0404e4111f1b3e7a29d722517d33251c15d578c61a30aaea9cdd3
|
7
|
+
data.tar.gz: dea580745305488adb0c1dbf9661392f1fbbc00cb0031b0e4c1958db21a713b86418a48ce338aff2b1636bc0302ee9bd95cf7fc5bafb260f36dc6999acde7a28
|
data/README.markdown
CHANGED
@@ -50,7 +50,7 @@ if Rails.env.production?
|
|
50
50
|
end
|
51
51
|
```
|
52
52
|
|
53
|
-
`delayed_job_web` runs as a Sinatra application within the rails application. Visit it at `/
|
53
|
+
`delayed_job_web` runs as a Sinatra application within the rails application. Visit it at `/delayed_job`.
|
54
54
|
|
55
55
|
## Serving static assets
|
56
56
|
|
data/delayed_job_web.gemspec
CHANGED
@@ -115,9 +115,11 @@ class DelayedJobWeb < Sinatra::Base
|
|
115
115
|
redirect back
|
116
116
|
end
|
117
117
|
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
%w(pending failed).each do |page|
|
119
|
+
post "/requeue/#{page}" do
|
120
|
+
delayed_jobs(page.to_sym, @queues).update_all(:run_at => Time.now, :failed_at => nil)
|
121
|
+
redirect back
|
122
|
+
end
|
121
123
|
end
|
122
124
|
|
123
125
|
post "/requeue/:id" do
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<%= csrf_token_tag %>
|
5
5
|
<input type="submit" value="Clear Failed Jobs"></input>
|
6
6
|
</form>
|
7
|
-
<form action="<%= u('requeue/
|
7
|
+
<form action="<%= u('requeue/failed') %>" method="POST">
|
8
8
|
<%= csrf_token_tag %>
|
9
9
|
<input type="submit" value="Retry Failed Jobs"></input>
|
10
10
|
</form>
|
@@ -10,7 +10,7 @@ class TestDelayedJobWeb < MiniTest::Unit::TestCase
|
|
10
10
|
DelayedJobWeb
|
11
11
|
end
|
12
12
|
|
13
|
-
def
|
13
|
+
def test_requeue_failed
|
14
14
|
|
15
15
|
dataset = Minitest::Mock.new
|
16
16
|
where = lambda { | criteria |
|
@@ -22,7 +22,28 @@ class TestDelayedJobWeb < MiniTest::Unit::TestCase
|
|
22
22
|
|
23
23
|
Time.stub(:now, time) do
|
24
24
|
Delayed::Job.stub(:where, where) do
|
25
|
-
post "/requeue/
|
25
|
+
post "/requeue/failed", request_data, rack_env
|
26
|
+
last_response.status.must_equal 302
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
dataset.verify
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_requeue_pending
|
35
|
+
|
36
|
+
dataset = Minitest::Mock.new
|
37
|
+
where = lambda { | criteria |
|
38
|
+
criteria.must_equal 'last_error IS NOT NULL'
|
39
|
+
dataset
|
40
|
+
}
|
41
|
+
|
42
|
+
dataset.expect(:update_all, nil, [:run_at => time, :failed_at => nil])
|
43
|
+
|
44
|
+
Time.stub(:now, time) do
|
45
|
+
Delayed::Job.stub(:where, where) do
|
46
|
+
post "/requeue/failed", request_data, rack_env
|
26
47
|
last_response.status.must_equal 302
|
27
48
|
end
|
28
49
|
end
|
metadata
CHANGED
@@ -1,97 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_job_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erick Schmitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.4.4
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.4.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activerecord
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 3.0.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
40
|
version: 3.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: delayed_job
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 2.0.3
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.0.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '4.2'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '4.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rack-test
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.6'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.6'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rails
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - ~>
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '4.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - ~>
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '4.0'
|
97
97
|
description: Web interface for delayed_job inspired by resque
|
@@ -107,8 +107,8 @@ files:
|
|
107
107
|
- LICENSE.txt
|
108
108
|
- README.markdown
|
109
109
|
- Rakefile
|
110
|
-
- delayed_job_web.gemspec
|
111
110
|
- bin/delayed_job_web
|
111
|
+
- delayed_job_web.gemspec
|
112
112
|
- lib/delayed_job_web.rb
|
113
113
|
- lib/delayed_job_web/application/app.rb
|
114
114
|
- lib/delayed_job_web/application/public/images/poll.png
|
@@ -143,17 +143,17 @@ require_paths:
|
|
143
143
|
- lib
|
144
144
|
required_ruby_version: !ruby/object:Gem::Requirement
|
145
145
|
requirements:
|
146
|
-
- -
|
146
|
+
- - ">="
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- -
|
151
|
+
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
153
|
version: '0'
|
154
154
|
requirements: []
|
155
155
|
rubyforge_project:
|
156
|
-
rubygems_version: 2.
|
156
|
+
rubygems_version: 2.2.2
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Web interface for delayed_job inspired by resque
|