DtcQueueBundle: The worker is not being detected while running (ODM)

Hey. I am using Doctrine ODM. I’m able to enqueue a job. But, when I run, I get an error due to not detecting the worker

0 - Call to a member function setCurrentJob() on null
#0 /var/www/app/vendor/mmucklo/queue-bundle/Manager/WorkerManager.php(103): Dtc\QueueBundle\Manager\WorkerManager->runJob(Object(Dtc\QueueBundle\Document\Job))
#1 /var/www/app/vendor/mmucklo/queue-bundle/Run/Loop.php(133): Dtc\QueueBundle\Manager\WorkerManager->run(NULL, NULL, true, '5b2d42ba64cf820...')
#2 /var/www/app/vendor/mmucklo/queue-bundle/Command/RunCommand.php(132): Dtc\QueueBundle\Run\Loop->runLoop(1529692858.4856, NULL, NULL, 1, NULL, 500000000)
#3 /var/www/app/vendor/symfony/console/Command/Command.php(251): Dtc\QueueBundle\Command\RunCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/app/vendor/symfony/console/Application.php(904): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/app/vendor/symfony/framework-bundle/Console/Application.php(89): Symfony\Component\Console\Application->doRunCommand(Object(Dtc\QueueBundle\Command\RunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/app/vendor/symfony/console/Application.php(262): Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand(Object(Dtc\QueueBundle\Command\RunCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/app/vendor/symfony/framework-bundle/Console/Application.php(75): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/app/vendor/symfony/console/Application.php(145): Symfony\Bundle\FrameworkBundle\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/app/bin/console(44): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput))
#10 {main}

I tried to dump the workers in the logs. But, it’s an empty array.

This is what I have in my yaml services:

    App\Worker\MyCustomWorker:
        public: true
        tags:
            - {name: 'dtc_queue.worker'}

(I tried to set the public to false too. I got the same error.)

And, in my Worker Class, I have this for the name:

    public function getName(): string
    {
        return 'MyCustom';
    }

Any idea?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

Sent instructions to reach me.