worked pretty well but suddenly I'm seeing multiple emails go out or
none at all. It seems that the worker is either not being launched or
is failing to properly update the DB (so completed jobs are not marked
as such). I should note that I'm not running the workers from a cron
job but executing them immediately from my controller. It calls the
plugin component's load() which then creates the job, then it should
run a worker (which would then run my shell task).
public function load($task_name, $data = array())
{
if ($queued = $this->QueuedTask->createJob($task_name, $data))
{
// http://www.zeen.co.uk/code/view/run-cakephp-console-from-a-component
$cmd = 'nohup
'.CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'console'.DS.'cake'
. ' -app '.APP.' queue runworker >/dev/null &';
exec($cmd);
}
return $queued;
}
Is anyone familiar with this plugin? I'm having some trouble figuring
out how best to debug this.
http://bakery.cakephp.org/articles/view/cakephp-simple-queue-plugin
http://wiki.github.com/MSeven/cakephp_queue/
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
To unsubscribe, reply using "remove me" as the subject.
No comments:
Post a Comment