Howto restart after fresh deployed code ?
Cyrille37 opened this issue · 2 comments
Hi,
Thanks for Ur nice work :-)
Laravel Queues have a queue:restart
command, to use after deployed fresh code (usually in composer 'post-install-cmd' event).
How to do with laravel-amqp when listening forever ?
Is there a way to create command like laravel-amqp:restart
?
Thanks & cheers
As:
- The Queue Laravel system use the cache
$this->cache->get('illuminate:queue:restart')
to compare date of the last restart, to know if restart is required. - php-amqplib can handle PCNTL signals
Perhaps one on this recipe could be used ... I continue to search ...
As far as i'am concerned you need to handle this yourself.
The package itself has no "helper commands" yet and is more like a library you can build on top of.
I would suggest a daemon like supervisord to observe the instance and restart your consumer on deployment.
EDIT: If you have further suggestion how your idea could fit into laravel-amqp, please don't hesitate to present them here. Also if anyone is interested please join the conversation.