resque-scheduler 1.9.4 → 1.9.5

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 1.9.5 (???)
2
+
3
+ * Updated scheduler rake task to allow for an alternate setup task
4
+ to avoid loading the entire stack. (chewbranca)
5
+
1
6
  ## 1.9.4 (2010-07-29)
2
7
 
3
8
  * Adding ability to remove jobs from delayed queue (joshsz)
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:
@@ -39,7 +39,13 @@ module Resque
39
39
  def register_signal_handlers
40
40
  trap("TERM") { shutdown }
41
41
  trap("INT") { shutdown }
42
- trap('QUIT') { shutdown } unless defined? JRUBY_VERSION
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 => :setup do
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
@@ -1,3 +1,3 @@
1
1
  module ResqueScheduler
2
- Version = '1.9.4'
2
+ Version = '1.9.5'
3
3
  end
@@ -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.4"
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-07-29}
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: 59
4
+ hash: 57
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 9
9
- - 4
10
- version: 1.9.4
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-07-29 00:00:00 -07:00
18
+ date: 2010-09-09 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency