-
Notifications
You must be signed in to change notification settings - Fork 76
Job executed synchronously when app running in PHP executable #30
Comments
same problem here, any solution? if we Queue::push its awaiting.. |
im on windows btw.. solution:
|
Tks @nmkr, now is running smoothly |
PHP cli is blocking, can only have 1 request. Not sure if that is the problem. But cli mode is only for testing right? |
And is this Linux? Or Windows? I'll try to reproduce and try the popen way. |
@barryvdh For me it's on linux. PHP cli is blocking but that should not be the issue, since the async queue spawns a new process, no ? And, yes the cli is mostly used in dev mode I assume as well. |
I have the same problem, but also when the app is running via apache mod_php... |
Okay will check it out. Perhaps bring the Symfony process component back. |
In the user contributed notes of exec in php.net (http://php.net/manual/fr/function.exec.php), there is this comment, if it can help:
So it seems that popen and pclose must be used on windows for execution in background. |
Can you all try this, using the Symfony Process command?
|
@barryvdh Works fine for me :) |
Okay cool, if the rest can confirm (can also try |
For me it's still synchronous (PHP 5.6.5 CLI, linux). I've tried with |
What's odd is that it seems to be sync only for PHP commands. If I replace the command with |
Strange. How I did it before is also how Laravel does it: https://github.com/laravel/framework/blob/388aa6a1c3aa16a4e7f6fa850fa6f08bd3143ccd/src/Illuminate/Console/Scheduling/Event.php#L126 |
I created an async job for a long processing tasks, it gets correctly executed asynchronously when the app is running via apache mod_php, but it gets executed synchronously when the app is running via the PHP CLI server mode.
The text was updated successfully, but these errors were encountered: