# Backgroundrb

**URL:** <https://www.ruby-forum.com/t/backgroundrb/134196>\
**Category:** Rails\
**Created:** [April 8, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/backgroundrb/134196 "2008-04-08T19:56:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [April 8, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/backgroundrb/134196/1 "2008-04-08T19:56:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [April 9, 2008, 12:06am UTC](https://www.ruby-forum.com/t/backgroundrb/134196/2 "2008-04-09T00:06:04Z")

</div>

Ignore this…I learned you have to restart backgroundrb each time you  
change a worker script, even in development.
