Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix issues with environments

  • Loading branch information...
commit e2248f8d048fb6f8ec06a85a5c9ac506c2748eab 1 parent 9785d99
@gnufied authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.