Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[2.0] Let user choose custom env #483

Merged
merged 1 commit into from
Jan 29, 2019
Merged

[2.0] Let user choose custom env #483

merged 1 commit into from
Jan 29, 2019

Conversation

setkyar
Copy link
Contributor

@setkyar setkyar commented Jan 29, 2019

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.

'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?

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.
@driesvints driesvints changed the title Let user choose custom env [2.0] Let user choose custom env Jan 29, 2019
@taylorotwell taylorotwell merged commit bd7cd20 into laravel:2.0 Jan 29, 2019
@rudiedirkx
Copy link

This is a secret config without a default. Usually all the possible config is in the config file. Maybe add a 'env' => null default to config/horizon.php so people will know this option exists?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants