From 814d4b2e2d76d2eaefca9c69f8945cb52debe757 Mon Sep 17 00:00:00 2001 From: Set Kyar Wa Lar Date: Tue, 29 Jan 2019 18:24:19 +0800 Subject: [PATCH] Let user choose custom env I have 2 Horizon servers which handle different `supervisor`. For example, currently I have to use like the following and I need to update my `.env` file `environment` as `workerOne` and `workerTwo` separately. ```php 'workerOne' => [ 'supervisor-1' => [ 'connection' => 'redis', 'queue' => ['default'], 'balance' => 'simple', 'processes' => 10, 'tries' => 3, ], ] 'workerTwo' => [ 'supervisor-2' => [ 'connection' => 'redis', 'queue' => ['default'], 'balance' => 'simple', 'processes' => 10, 'tries' => 3, ], ] ``` What happened was some worker check `.env` environment as well. So, I got environment sharing problems. Can we use separately? If that's open for PR. I would submit. --- src/Console/HorizonCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Console/HorizonCommand.php b/src/Console/HorizonCommand.php index 2e02a0c2..ba8acdc4 100644 --- a/src/Console/HorizonCommand.php +++ b/src/Console/HorizonCommand.php @@ -48,7 +48,7 @@ public function handle() }); ProvisioningPlan::get(MasterSupervisor::name())->deploy( - config('app.env') + config('horizon.env') ?? config('app.env') ); $this->info('Horizon started successfully.');