[Backgroundrb-devel] nil-error

Ian Smith-Heisters heisters at greenriver.org
Wed Mar 19 19:02:51 EDT 2008


Hi all,

I've got the error below in my backgroundrb_debug.log. I've tried to
reproduce the error in the development environment, but the only way I
can get the same thing is by calling ask_work with a bogus worker
name. Calling it with the production code causes no error.

Here's an example of what the code calls:

MiddleMan.ask_work(:worker => :agronomy_worker, :worker_method =>
:transmit, :data => 414)

I also tried playing with adding a job_key, but that didn't seem to
change anything. Should I be providing a job_key and ensuring that
it's unique? I've no need to reference the job in progress, so I'm
fine with the default key, unless of course it's likely to be
non-unique and cause a bug.

Anyone have an idea on what could be causing this? I'm running svn revision 314.

Thanks,
Ian

--- backgroundrb_debug.log ---
Client disconected
000000079^D^H{  :       type:^Ldo_work:^Kworker:^Tagronomy_worker:
 datai^B<9E>^A:^Rworker_method:^Mtransmit
typedo_workdata414workeragronomy_workerworker_methodtransmit
undefined method `send_request' for nil:NilClass
/vendor/plugins/backgroundrb/framework/packet/packet_master.rb:43:in
`ask_worker'
/vendor/plugins/backgroundrb/server/master_worker.rb:105:in `process_work'
/vendor/plugins/backgroundrb/server/master_worker.rb:37:in `receive_data'
/vendor/plugins/backgroundrb/lib/../framework/packet/bin_parser.rb:29:in `call'
/vendor/plugins/backgroundrb/lib/../framework/packet/bin_parser.rb:29:in
`extract'
/vendor/plugins/backgroundrb/server/master_worker.rb:33:in `receive_data'
/vendor/plugins/backgroundrb/framework/packet/core.rb:199:in
`read_external_socket'
/vendor/plugins/backgroundrb/framework/packet/core.rb:191:in
`handle_external_messages'
/vendor/plugins/backgroundrb/framework/packet/core.rb:160:in `start_reactor'
/vendor/plugins/backgroundrb/framework/packet/core.rb:156:in `each'
/vendor/plugins/backgroundrb/framework/packet/core.rb:156:in `start_reactor'
/vendor/plugins/backgroundrb/framework/packet/core.rb:147:in `loop'
/vendor/plugins/backgroundrb/framework/packet/core.rb:147:in `start_reactor'
/vendor/plugins/backgroundrb/framework/packet/packet_master.rb:20:in `run'
/vendor/plugins/backgroundrb/server/master_worker.rb:163:in `initialize'
/script/backgroundrb:42:in `new'
/script/backgroundrb:42


More information about the Backgroundrb-devel mailing list