resque-scheduler 2.0.0.c → 2.0.0.d

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of resque-scheduler might be problematic. Click here for more details.

data/HISTORY.md CHANGED
@@ -1,8 +1,27 @@
1
1
  ## 2.0.0 (???)
2
2
 
3
+ * TODO: address race condition with delayed jobs (using redis transactions)
4
+
5
+ ## 2.0.0.d (2011-04-04)
6
+
7
+ * porting bug fixes from v1.9-stable
8
+
9
+ ## 2.0.0.c
10
+
11
+ * Rake task drop a pid file (sreeix)
12
+
13
+ ## 2.0.0.b
14
+
15
+ * Bug fixes
16
+
17
+ ## 2.0.0.a
18
+
3
19
  * Dynamic schedule support (brianjlandau, davidyang)
4
20
  * Now depends on redis >=1.3
5
- * Rake task drop a pid file (sreeix)
21
+
22
+ ## 1.9.9 (2011-03-29)
23
+
24
+ * Compatibility with resque 1.15.0
6
25
 
7
26
  ## 1.9.8 (???)
8
27
 
data/README.markdown CHANGED
@@ -169,7 +169,7 @@ custom job class to support the #scheduled method:
169
169
  # Wrapper API to forward a Resque::Job creation API call into
170
170
  # a JobWithStatus call.
171
171
  def self.scheduled(queue, klass, *args)
172
- create(args)
172
+ create(*args)
173
173
  end
174
174
  end
175
175
  end
@@ -168,7 +168,7 @@ module Resque
168
168
  end
169
169
  else
170
170
  Resque::Job.create(queue, klass_name, *params)
171
- end
171
+ end
172
172
  rescue
173
173
  log! "Failed to enqueue #{klass_name}:\n #{$!}"
174
174
  end
@@ -27,7 +27,7 @@ module ResqueScheduler
27
27
  post "/schedule/requeue" do
28
28
  config = Resque.schedule[params['job_name']]
29
29
  Resque::Scheduler.enqueue_from_config(config)
30
- redirect url("/overview")
30
+ redirect u("/overview")
31
31
  end
32
32
 
33
33
  get "/delayed" do
@@ -43,7 +43,7 @@ module ResqueScheduler
43
43
  post "/delayed/queue_now" do
44
44
  timestamp = params['timestamp']
45
45
  Resque::Scheduler.enqueue_delayed_items_for_timestamp(timestamp.to_i) if timestamp.to_i > 0
46
- redirect url("/overview")
46
+ redirect u("/overview")
47
47
  end
48
48
 
49
49
  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="<%= url "/delayed/queue_now" %>" method="post">
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="<%= url "delayed/#{timestamp}" %>"><%= format_time(Time.at(timestamp)) %></a></td>
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="<%= url "delayed/#{timestamp}" %>">see details</a>
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="<%= url "/schedule/requeue" %>" method="post">
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>
@@ -1,3 +1,3 @@
1
1
  module ResqueScheduler
2
- Version = '2.0.0.c'
2
+ Version = '2.0.0.d'
3
3
  end
@@ -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
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 2
7
7
  - 0
8
8
  - 0
9
- - c
10
- version: 2.0.0.c
9
+ - d
10
+ version: 2.0.0.d
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ben VandenBos
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-25 00:00:00 -07:00
18
+ date: 2011-04-03 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency