Closed tacman closed 1 year ago
Yeah, that would be cool. You're thinking this method would build a Process
object based on the command (and the current script)? For example, runCommandAsync('some:command foo bar')
would convert to a process: bin/console some:command foo bar
?
I think the first step would be to add a RunsProcesses::runProcessAsync()
method (to be used by RunsCommands
).
Yes, that's what I was thinking, though I'm not sure. I'm seeing some cases where I would benefit from a ->wait() method, but I want to use this rather than the Symfony process.
I'm thinking runCommandAsync()
would return the Process
so you could manually call wait()
if desired.
Alternatively, using RunCommandMessage (Symfony 6.4) may accomplish the goal of handling long-running tasks. So I'll close this.
What about a runCommandAsync method, that works the same way the Symfony Process component works?
https://symfony.com/doc/current/components/process.html#running-processes-asynchronously