schmittjoh / JMSJobQueueBundle

Run and Schedule Symfony Console Commands as Background Jobs
http://jmsyst.com/bundles/JMSJobQueueBundle
335 stars 254 forks source link

symfony4.3 - The "--jms-job-id" option does not exist #233

Open salamichel opened 5 years ago

salamichel commented 5 years ago

Hi when I scheduled a command with bin/console jms-job-queue:run --env=win

The related job failed with error : The "--jms-job-id" option does not exist. in errorOutput (job table)

My Code work well with symfony 2.8 and JmsJobQueue 1.4

The same code under Symfony 4.3 and packages below composer info jms* jms/job-queue-bundle 2.0.1 Allows to run and schedule Symfony console commands as background jobs. jms/metadata 1.7.0 Class/method/property metadata management in PHP jms/parser-lib 1.0.0 A library for easily creating recursive-descent parsers. jms/serializer 1.14.0 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML. jms/serializer-bundle 2.4.4 Allows you to easily serialize, and deserialize data of any complexity jms/translation-bundle 1.4.4 Puts the Symfony Translation Component on steroids

haegar commented 5 years ago

(just had the same)

You are missing to modify your bin/console file as in the documentation:

Finally, have your app/console use JMSJobQueueBundle?s Application:

// use Symfony\Bundle\FrameworkBundle\Console\Application; use JMS\JobQueueBundle\Console\Application;

For my project I also had to modify config/bundles.php instead of the documented AppKernel.php the following way:

return [ ... JMS\JobQueueBundle\JMSJobQueueBundle::class => ['all' => true], ... ];