File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 33* Added ` rake resque:workers ` task for starting multiple workers.
44* 1.9.x compatibility
55* Bugfix: Yajl decoder doesn't care about valid UTF-8
6+ * config.ru loads RESQUECONFIG if the ENV variable is set.
7+ * ` resque-web ` now sets RESQUECONFIG
68
79## 1.2.0 (2009-11-25)
810
Original file line number Diff line number Diff line change @@ -30,18 +30,15 @@ Common options:
3030 --version Show version
3131usage
3232else
33- if !ENV [ 'CONFIG ' ] &&ARGV [ -1 ] &&ARGV [ -1 ] [ 0 ] !=?-&&( ARGV [ -2 ] ?ARGV [ -2 ] [ 0 ] !=?-:true )
33+ if !ENV [ 'RESQUECONFIG ' ] &&ARGV [ -1 ] &&ARGV [ -1 ] [ 0 ] !=?-&&( ARGV [ -2 ] ?ARGV [ -2 ] [ 0 ] !=?-:true )
3434 if File . file? ( file = File . expand_path ( ARGV [ -1 ] ) )
3535 ARGV . delete_at ( -1 )
36- ENV [ 'CONFIG ' ] = file
36+ ENV [ 'RESQUECONFIG ' ] = file
3737 else
3838 abort "** Can't find #{ file } "
3939 end
4040 end
4141
42- args = ARGV
43- ENV [ 'RUBYLIB' ] = ENV [ 'RUBYLIB' ] . to_s + ':' + __DIR__ + '/../lib'
44- args . unshift '-e' , 'require "resque";load ENV["CONFIG"] if ENV["CONFIG"]'
45- args . push File . expand_path ( File . dirname ( __FILE__ ) + "/../config.ru" )
46- exec "rackup" , *args
42+ ARGV . push File . expand_path ( File . dirname ( __FILE__ ) + "/../config.ru" )
43+ exec "rackup" , *ARGV
4744end
Original file line number Diff line number Diff line change @@ -4,5 +4,11 @@ require 'logger'
44$LOAD_PATH. unshift File . expand_path ( File . dirname ( __FILE__ ) + '/lib' )
55require 'resque/server'
66
7+ # Set the RESQUECONFIG env variable if you've a `resque.rb` or similar
8+ # config file you want loaded on boot.
9+ if ENV [ 'RESQUECONFIG' ] && File . exists? ( File . expand_path ( ENV [ 'RESQUECONFIG' ] ) )
10+ load File . expand_path ( ENV [ 'RESQUECONFIG' ] )
11+ end
12+
713use Rack ::ShowExceptions
814run Resque ::Server . new
You can’t perform that action at this time.
0 commit comments