resque-scheduler 1.9.4 → 1.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/HISTORY.md +5 -0
- data/README.markdown +6 -0
- data/lib/resque/scheduler.rb +7 -1
- data/lib/resque_scheduler/tasks.rb +9 -1
- data/lib/resque_scheduler/version.rb +1 -1
- data/resque-scheduler.gemspec +2 -2
- metadata +4 -4
data/HISTORY.md
CHANGED
data/README.markdown
CHANGED
|
@@ -119,6 +119,12 @@ NOTE: If you have added the 2 lines bellow to your Rails Rakefile
|
|
|
119
119
|
and you don't have to specify RAILS_ENV if the var is correctly set in
|
|
120
120
|
environment.rb
|
|
121
121
|
|
|
122
|
+
Alternatively, you can use your resque initializer to avoid loading the entire
|
|
123
|
+
rails stack.
|
|
124
|
+
|
|
125
|
+
$ rake resque:scheduler INITIALIZER_PATH=config/initializers/resque.rb
|
|
126
|
+
|
|
127
|
+
|
|
122
128
|
Multiple envs are allowed, separated by commas:
|
|
123
129
|
|
|
124
130
|
create_fake_leaderboards:
|
data/lib/resque/scheduler.rb
CHANGED
|
@@ -39,7 +39,13 @@ module Resque
|
|
|
39
39
|
def register_signal_handlers
|
|
40
40
|
trap("TERM") { shutdown }
|
|
41
41
|
trap("INT") { shutdown }
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
begin
|
|
44
|
+
trap('QUIT') { shutdown }
|
|
45
|
+
trap('USR1') { kill_child }
|
|
46
|
+
rescue ArgumentError
|
|
47
|
+
warn "Signals QUIT and USR1 not supported."
|
|
48
|
+
end
|
|
43
49
|
end
|
|
44
50
|
|
|
45
51
|
# Pulls the schedule from Resque.schedule and loads it into the
|
|
@@ -5,7 +5,7 @@ namespace :resque do
|
|
|
5
5
|
task :setup
|
|
6
6
|
|
|
7
7
|
desc "Start Resque Scheduler"
|
|
8
|
-
task :scheduler => :
|
|
8
|
+
task :scheduler => :scheduler_setup do
|
|
9
9
|
require 'resque'
|
|
10
10
|
require 'resque_scheduler'
|
|
11
11
|
|
|
@@ -13,4 +13,12 @@ namespace :resque do
|
|
|
13
13
|
Resque::Scheduler.run
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
task :scheduler_setup do
|
|
17
|
+
if ENV['INITIALIZER_PATH']
|
|
18
|
+
load ENV['INITIALIZER_PATH'].to_s.strip
|
|
19
|
+
else
|
|
20
|
+
Rake::Task['resque:setup'].invoke
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
16
24
|
end
|
data/resque-scheduler.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{resque-scheduler}
|
|
8
|
-
s.version = "1.9.
|
|
8
|
+
s.version = "1.9.5"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Ben VandenBos"]
|
|
12
|
-
s.date = %q{2010-
|
|
12
|
+
s.date = %q{2010-09-09}
|
|
13
13
|
s.description = %q{Light weight job scheduling on top of Resque.
|
|
14
14
|
Adds methods enqueue_at/enqueue_in to schedule jobs in the future.
|
|
15
15
|
Also supports queueing jobs on a fixed, cron-like schedule.}
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: resque-scheduler
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 57
|
|
5
5
|
prerelease: false
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 9
|
|
9
|
-
-
|
|
10
|
-
version: 1.9.
|
|
9
|
+
- 5
|
|
10
|
+
version: 1.9.5
|
|
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: 2010-
|
|
18
|
+
date: 2010-09-09 00:00:00 -07:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|