Skip to content
Browse files

fix issues with environments

  • Loading branch information...
1 parent 9785d99 commit e2248f8d048fb6f8ec06a85a5c9ac506c2748eab @gnufied committed
Showing with 6 additions and 4 deletions.
  1. +3 −1 README
  2. +1 −1 lib/backgroundrb/bdrb_config.rb
  3. +2 −2 lib/backgroundrb/rails_worker_proxy.rb
View
4 README
@@ -20,4 +20,6 @@ Copyright (c) 2007 Hemant Kumar (gethemant [at] gmail.com )
== Usage
-Please look into http://backgroundrb.rubyforge.org
+Please look into http://backgroundrb.rubyforge.org
+
+Something else here.
View
2 lib/backgroundrb/bdrb_config.rb
@@ -24,7 +24,7 @@ def self.parse_cmd_options(argv)
def self.read_config(config_file)
config = YAML.load(ERB.new(IO.read(config_file)).result)
environment = ENV["RAILS_ENV"] || config[:backgroundrb][:environment] || "development"
- Object.const_set("RAILS_ENV",environment) unless defined?(RAILS_ENV)
+ Object.const_set("RAILS_ENV",environment)
ENV["RAILS_ENV"] = environment
config
end
View
4 lib/backgroundrb/rails_worker_proxy.rb
@@ -17,9 +17,9 @@ def method_missing(method_id,*args)
if worker_method =~ /^async_(\w+)/
method_name = $1
- wokrer_options = compact(:worker => worker_name,:worker_key => worker_key,
+ worker_options = compact(:worker => worker_name,:worker_key => worker_key,
:worker_method => method_name,:job_key => job_key, :arg => arg)
- run_method(host_info,:ask_work,wokrer_options)
+ run_method(host_info,:ask_work,worker_options)
elsif worker_method =~ /^enq_(\w+)/i
raise NoJobKey.new("Must specify a job key with enqueued tasks") if job_key.blank?
method_name = $1

0 comments on commit e2248f8

Please sign in to comment.
Something went wrong with that request. Please try again.