I think I am mostly set up but I seem to be failing to get evidence that it works...
class QmManualEnchiladaWorker < BackgrounDRb::MetaWorker set_worker_name :qm_manual_enchilada_worker def create(args = nil) # this method is called, when worker is loaded for the first time end
def build_QM_Manual_pdf system('touch backgroundrb_test') my_test = Time.now.strftime("%m/%d/%Y") my_test end end
and in console...
MiddleMan.worker(:qm_manual_enchilada_worker).build_QM_Manual_pdf {:worker=>:qm_manual_enchilada_worker, :worker_method=>:build_QM_Manual_pdf, :type=>:do_work} => nil
no result, no file
backgroundrb server is indeed running on port 11006 $ ps aux|grep backgroundrb craig 17389 1.0 2.6 42764 27300 pts/3 S 10:24 0:05 ruby script/backgroundrb start
$ netstat -an |grep 11006 tcp 0 0 0.0.0.0:11006 0.0.0.0:* LISTEN tcp 1 0 127.0.0.1:33764 127.0.0.1:11006 CLOSE_WAIT tcp 0 0 127.0.0.1:11006 127.0.0.1:53379 ESTABLISHED tcp 1 0 127.0.0.1:33766 127.0.0.1:11006 CLOSE_WAIT tcp 0 0 127.0.0.1:53379 127.0.0.1:11006 ESTABLISHED tcp 1 0 127.0.0.1:33765 127.0.0.1:11006 CLOSE_WAIT
Need someone to toss me a bone here...
Craig