Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
WebserverBlueprint - Queue Worker. fix environment variables
Browse files Browse the repository at this point in the history
replcaed one-time setEnvironmentVarriablesFrom with setEnvironmentVariablesCallback
which will always take the current environment variables of the server service
  • Loading branch information
svensp committed Jan 14, 2020
1 parent 1c6a803 commit e5b7125
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Blueprint/Webserver/WebserverBlueprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,9 @@ protected function addQueueWorker(Configuration $config, Service $serverService,
});
$laravelQueueWorker->addVolumeFrom($serverService);
$laravelQueueWorker->addLinksFrom($serverService);
$laravelQueueWorker->setEnvironmentVariablesFrom($serverService);
$laravelQueueWorker->setEnvironmentVariablesCallback(function() use ($serverService) {
return $serverService->getEnvironmentVariables();
});

$laravelQueueWorker->setEnvironmentVariable('QUEUE_NAME', $name);
$laravelQueueWorker->setEnvironmentVariable('QUEUE_CONNECTION', $connection);
Expand Down

0 comments on commit e5b7125

Please sign in to comment.