Elastic Beanstalk doesn't run commands in the background

0

I created config file "z.config" in .ebextensions with the following in it:

container_commands:
00queue:
command: "nohup php /var/app/ondeck/artisan queue:work > text.out 2> error.err < /dev/null &"

The deployment process gets stuck for almost an hour, and after a while it redeploy itself again!!
When SSHing to the EC2 I ran the command with no errors.

Is there any thing wrong with the syntax or Is there another way to run the command in the background without going to infinite deploying loop??

I tried also "php /var/app/ondeck/artisan queue:work &", "php artisan queue:work &", "php artisan queue:work < /dev/null &"
None worked as expected.
I have other configurations and commands and they're working great except that one.

feita há 5 anos247 visualizações
2 Respostas
0

Any one ?!

respondido há 5 anos
0

I fixed it.
The command that worked fine for me is:
"nohup php artisan queue:work > /dev/null 2> /dev/null < /dev/null &"

respondido há 5 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas