I realize this was brought up not long ago but I could not fix this
problem using any info from the previous thread. I'm using the php
client from http://sourceforge.net/projects/beanstalk/. I have a
worker that I run on the command line that shows 50%-60% cpu usage
(according to top) when there are no jobs in the queue. I assume that
this is not normal so I guess there is some problem in the
implementation of my worker script. Does anyone know what it is?
Thanks
Here is my worker code:
<?php
exec("beanstalkd -d -l 127.0.0.1 -p 11300");
require('BeanStalk.class.php');
$beanstalk = BeanStalk::open(array(
'servers' => array( '127.0.0.1:11300' ),
'select' => 'random wait'
));
$beanstalk->watch('test');
while ($job = $beanstalk->reserve()) {
exec($job->get());
Beanstalk::delete($job);
}
?>
--
You received this message because you are subscribed to the Google Groups
"beanstalk-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/beanstalk-talk?hl=en.