I have a symfony command that need to run on the background since its a long running task. I already search on google for how many hours but I couldnt find an answer. Let's say I have this new process in symfony.
$process = new Process('php app/console run:task:import');
$process->start();
return new \Symfony\Component\HttpFoundation\Response($process->getPid());
As stated on the documentation. Any asynchronous process can be stopped at any time with the stop() method;
$process->stop(timeout, signal);
now what if I have two process? import1 and import2. How can I stop only import2?