resque-scheduler 1.9.8 → 1.9.9
Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md
CHANGED
@@ -26,7 +26,7 @@ module ResqueScheduler
|
|
26
26
|
post "/schedule/requeue" do
|
27
27
|
config = Resque.schedule[params['job_name']]
|
28
28
|
Resque::Scheduler.enqueue_from_config(config)
|
29
|
-
redirect
|
29
|
+
redirect u("/overview")
|
30
30
|
end
|
31
31
|
|
32
32
|
get "/delayed" do
|
@@ -42,7 +42,7 @@ module ResqueScheduler
|
|
42
42
|
post "/delayed/queue_now" do
|
43
43
|
timestamp = params['timestamp']
|
44
44
|
Resque::Scheduler.enqueue_delayed_items_for_timestamp(timestamp.to_i) if timestamp.to_i > 0
|
45
|
-
redirect
|
45
|
+
redirect u("/overview")
|
46
46
|
end
|
47
47
|
|
48
48
|
end
|
@@ -19,19 +19,19 @@
|
|
19
19
|
<% resque.delayed_queue_peek(start, start+20).each do |timestamp| %>
|
20
20
|
<tr>
|
21
21
|
<td>
|
22
|
-
<form action="<%=
|
22
|
+
<form action="<%= u "/delayed/queue_now" %>" method="post">
|
23
23
|
<input type="hidden" name="timestamp" value="<%= timestamp.to_i %>">
|
24
24
|
<input type="submit" value="Queue now">
|
25
25
|
</form>
|
26
26
|
</td>
|
27
|
-
<td><a href="<%=
|
27
|
+
<td><a href="<%= u "delayed/#{timestamp}" %>"><%= format_time(Time.at(timestamp)) %></a></td>
|
28
28
|
<td><%= delayed_timestamp_size = resque.delayed_timestamp_size(timestamp) %></td>
|
29
29
|
<% job = resque.delayed_timestamp_peek(timestamp, 0, 1).first %>
|
30
30
|
<td>
|
31
31
|
<% if job && delayed_timestamp_size == 1 %>
|
32
32
|
<%= h(job['class']) %>
|
33
33
|
<% else %>
|
34
|
-
<a href="<%=
|
34
|
+
<a href="<%= u "delayed/#{timestamp}" %>">see details</a>
|
35
35
|
<% end %>
|
36
36
|
</td>
|
37
37
|
<td><%= h(job['args'].inspect) if job && delayed_timestamp_size == 1 %></td>
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<% config = Resque.schedule[name] %>
|
20
20
|
<tr>
|
21
21
|
<td>
|
22
|
-
<form action="<%=
|
22
|
+
<form action="<%= u "/schedule/requeue" %>" method="post">
|
23
23
|
<input type="hidden" name="job_name" value="<%= h name %>">
|
24
24
|
<input type="submit" value="Queue now">
|
25
25
|
</form>
|
@@ -27,8 +27,8 @@
|
|
27
27
|
<td><%= h name %></td>
|
28
28
|
<td><%= h config['description'] %></td>
|
29
29
|
<td style="white-space:nowrap"><%= (config['cron'].nil? && !config['every'].nil?) ?
|
30
|
-
h(
|
31
|
-
h(
|
30
|
+
h("every: #{config['every']}") :
|
31
|
+
h("cron: #{config['cron']}") %></td>
|
32
32
|
<td><%= (config['class'].nil? && !config['custom_job_class'].nil?) ?
|
33
33
|
h(config['custom_job_class']) :
|
34
34
|
h(config['class']) %></td>
|
data/test/resque-web_test.rb
CHANGED
@@ -12,7 +12,8 @@ end
|
|
12
12
|
context "on GET to /schedule with scheduled jobs" do
|
13
13
|
setup do
|
14
14
|
ENV['rails_env'] = 'production'
|
15
|
-
Resque.schedule = {:some_ivar_job => {'cron' => "* * * * *", 'class' => 'SomeIvarJob', 'args' => "/tmp", 'rails_env' => 'production'}
|
15
|
+
Resque.schedule = {:some_ivar_job => {'cron' => "* * * * *", 'class' => 'SomeIvarJob', 'args' => "/tmp", 'rails_env' => 'production'},
|
16
|
+
:some_other_job => {'queue' => 'high', 'class' => 'SomeOtherJob', 'args' => {:b => 'blah'}}}
|
16
17
|
Resque::Scheduler.load_schedule!
|
17
18
|
get "/schedule"
|
18
19
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 9
|
8
|
-
-
|
9
|
-
version: 1.9.
|
8
|
+
- 9
|
9
|
+
version: 1.9.9
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ben VandenBos
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-
|
17
|
+
date: 2011-03-29 00:00:00 -07:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|