Closed dotjim closed 10 years ago
Hi Jim!
Glad you like the module. Hope it's (mostly) been a useful addition to your environment :+1:
Can you tell if the job is making it to beanstalkd? I've done this by resetting beanstalkd, and then telnetting in to beanstalkd
$ telnet 127.0.0.1 11300
stats
stats
and then peek at the queue use queuename
- peek-ready
That should tell you if it's getting to the backend or not.
I mean what you're telling me seems a bit weird, if it's getting to the _addToQueue()
function - then it should be getting to the backend.
Does it work when you use a model from the backend?
Hi Patrick, Thanks for the response. I followed your steps and the task made it's way into the beanstalkd queue.
This morning the behaviour is working as expected, maybe I just needed to sleep on it! : )
I have a suspicion that the issue is code/config changes not taking effect (despite the standard Magento caches being cleared) until the worker script $ php shell/queue.php --watch default
is restarted. Perhaps APC or something else at play.
Thanks again for your help and input.
Ah
That would be it. The worker task needs restarted to take into account any code or config changes - because Magento stores config in memory when it's used to increase efficiency - so restarting the task is the best way to do that.
But glad it's working for you.
Hi there,
Firstly thanks for a great contribution! :+1:
I have a Magento Community Edition 1.7 environment successfully running this module using beanstalkd, with custom tasks being processed nicely by workers. I have encountered one oddity however, which is if I create a task from an Admin Controller the workers task is never invoked.
As an example if I fire off the shell based unit test of
php queue.php --send "default:test:hello"
the task executes correctly. However if I try to invoke the same task from an Admin Controller using the code below, the task never executes:I've tried passing our explicit storeId (1) into the third parameter of the
createTask
call, and even as far as emulating our store entirely via the following:The task never completes however. Is anyone able to help direct me on a possible cause/resolution?
My own tracing has gone as far as validating that
Lilmuckers_Queue_Model_Adapter_Beanstalk->_addToQueue()
method completes successfully, and this method includes the same information and task metadata as the shell based unit test. Nothing further happens after this.-James