You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the vlucas/phpdotenv library and my entire database connection configuration is in environment variables. Why can’t you pass local variables into the running process - this will solve the problem!
$env = isset($_ENV) ? $_ENV : null;
$process = new Process($cmd, null, $env, $message, $ttr);
The text was updated successfully, but these errors were encountered:
In my case this will solve the problem. When php yii queue/run is started, environment variables are initialized. Next, the tasks themselves are executed individually, in debaug i see yii queue/exec 18 300 (some args...) , but for some reason without environment variables. As I understand it, they are running in an individual process, why not put environment variables into it?! code above.
Why are environment variables not passed to the created process?!
yii2-queue/src/cli/Command.php
Line 185 in 726a4fd
I use the vlucas/phpdotenv library and my entire database connection configuration is in environment variables. Why can’t you pass local variables into the running process - this will solve the problem!
$env = isset($_ENV) ? $_ENV : null;
$process = new Process($cmd, null, $env, $message, $ttr);
The text was updated successfully, but these errors were encountered: