Enable queue running for dev environments to update with current code without needing to be restarted
This commit is contained in:
parent
0d799f28c7
commit
e037baadeb
7
init
7
init
@ -114,6 +114,11 @@ elif [ "$role" = "queue" -a -e artisan ]; then
|
||||
exec /bin/bash
|
||||
fi
|
||||
|
||||
QUEUE_CMD=work
|
||||
if [ "${env}" == "dev" ]; then
|
||||
QUEUE_CMD=listen
|
||||
fi
|
||||
|
||||
if [ -e .lumen ]; then
|
||||
echo "* Lumen detected..."
|
||||
else
|
||||
@ -131,7 +136,7 @@ elif [ "$role" = "queue" -a -e artisan ]; then
|
||||
|
||||
su www-data -s /bin/sh -c "
|
||||
while true; do
|
||||
php ${PHP_OPTIONS} artisan queue:work --verbose --tries=${WORK_TRIES:-1} --timeout=${WORK_TIMEOUT:-90} ${WORK_QUEUES:+--queue=${WORK_QUEUES}} ${WORK_MEMORY:+--memory=${WORK_MEMORY}} ${WORK_ONCE:+--once}
|
||||
php ${PHP_OPTIONS} artisan queue:${QUEUE_CMD} --verbose --tries=${WORK_TRIES:-1} --timeout=${WORK_TIMEOUT:-90} ${WORK_QUEUES:+--queue=${WORK_QUEUES}} ${WORK_MEMORY:+--memory=${WORK_MEMORY}} ${WORK_ONCE:+--once}
|
||||
done
|
||||
"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user