0

I am using symfony3 with armetiz/LeezyPheanstalkBundle. I want to preform a job that create table from given name. I already created the symfony command create:table with argument name that create the table if i run from console bin/console create:table test_table. Now I want to to the job using phenastalk when my event is fired up. The event work fine, even the data is send to tube, but the command does not execute. What is the problem?

This is the data:

$payload = ["name"  => $power_plant->getName()];
$jobData = ["command" => "create:table", "meta"  => $payload];

I set the tube name

$this->pheanstalk->useTube($this->tubeName);

I put the payload into tube:

$this->pheanstalk->put(json_encode($jobData));
$this->pheanstalk->watch($this->tubeName)->ignore('default')->reserve();

This is the data I see in the tube:

{
   "command":"create:table",
   "meta":{
       "name":"abc123"
   }

} But the table is not created, but if I run the command from console the table is created, so the command is ok. I assume that is something wrong with pheanstalk worker?

sanof
  • 349
  • 7
  • 18
  • beanstalkd knows nothing about what you want to do. It only knows about the data you give it. You still need to whip up code to take that data you are sending it and do the actual work. – georaldc Jun 06 '16 at 21:21
  • Possible duplicate of [Pheanstalk does not preform job](http://stackoverflow.com/questions/37644239/pheanstalk-does-not-preform-job) – Alister Bulman Jun 07 '16 at 13:03

0 Answers0