resque-scheduler 2.0.0.b → 2.0.0.c
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 +1 -0
- data/lib/resque/scheduler.rb +6 -2
- data/lib/resque_scheduler/server.rb +2 -2
- data/lib/resque_scheduler/tasks.rb +3 -1
- data/lib/resque_scheduler/version.rb +1 -1
- metadata +3 -3
data/HISTORY.md
CHANGED
data/lib/resque/scheduler.rb
CHANGED
@@ -35,8 +35,12 @@ module Resque
|
|
35
35
|
|
36
36
|
# Now start the scheduling part of the loop.
|
37
37
|
loop do
|
38
|
-
|
39
|
-
|
38
|
+
begin
|
39
|
+
handle_delayed_items
|
40
|
+
update_schedule if dynamic
|
41
|
+
rescue Errno::EAGAIN, Errno::ECONNRESET => e
|
42
|
+
warn e.message
|
43
|
+
end
|
40
44
|
poll_sleep
|
41
45
|
end
|
42
46
|
|
@@ -10,7 +10,7 @@ module ResqueScheduler
|
|
10
10
|
|
11
11
|
helpers do
|
12
12
|
def format_time(t)
|
13
|
-
t.strftime("%Y-%m-%d %H:%M:%S")
|
13
|
+
t.strftime("%Y-%m-%d %H:%M:%S %z")
|
14
14
|
end
|
15
15
|
|
16
16
|
def queue_from_class_name(class_name)
|
@@ -55,4 +55,4 @@ module ResqueScheduler
|
|
55
55
|
|
56
56
|
end
|
57
57
|
|
58
|
-
end
|
58
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
require 'resque/tasks'
|
2
2
|
# will give you the resque tasks
|
3
3
|
|
4
4
|
namespace :resque do
|
@@ -9,6 +9,8 @@ namespace :resque do
|
|
9
9
|
require 'resque'
|
10
10
|
require 'resque_scheduler'
|
11
11
|
|
12
|
+
File.open(ENV['PIDFILE'], 'w') { |f| f << Process.pid.to_s } if ENV['PIDFILE']
|
13
|
+
|
12
14
|
Resque::Scheduler.verbose = true if ENV['VERBOSE']
|
13
15
|
Resque::Scheduler.run
|
14
16
|
end
|
metadata
CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 2
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.0.
|
9
|
+
- c
|
10
|
+
version: 2.0.0.c
|
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-
|
18
|
+
date: 2011-03-25 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|