I'm running jms job queue with symfony 3.2 with php 7.1.
When I'm trying to run command with one argument - it does not passed into command.
Command config:
public function configure()
{
$this
->setName('app:import:companies')
->setDescription('Run companies import')
->setHelp('Run companies import')
->addArgument(
'taskId',
InputArgument::OPTIONAL,
'Crawler task ID (where we will get search parameters)',
null
);
}
Job creating:
$job = new Job(
'app:import:companies',
[
$task->getId(),
]
);
When the command executed via jms-job-queue:run I have following argv inside my command:
I'm running jms job queue with symfony 3.2 with php 7.1.
When I'm trying to run command with one argument - it does not passed into command.
Command config:
Job creating:
When the command executed via jms-job-queue:run I have following argv inside my command:
So, the runner have executed this command:
In this case I always have argumen taskId = null.
Corrent behavior in this case (in my opinion) - pass user arguments and options first after command name and then add jms-job-id:
With this command I have access to the taskId without problems.