Skip to content

Commit

Permalink
Merge pull request #4 from spira/feature/add-delay-to-retries
Browse files Browse the repository at this point in the history
added a failed jobs delay of 60 seconds (default)
  • Loading branch information
zakhenry committed Apr 11, 2016
2 parents feaed17 + 1359ad7 commit 5a7068a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config/queue-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
#set default values for env
export QUEUE=${QUEUE:-default}
export TRIES=${TRIES:-3}
export FAILDELAY=${FAILDELAY:-60}

echo "Starting queue '$QUEUE' with '$TRIES' tries"
echo "Starting queue '${QUEUE}' with '${TRIES}' tries and failed delay ${FAILDELAY}s"

which supervisord
supervisord -v
Expand Down
2 changes: 1 addition & 1 deletion config/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ logfile = /dev/null
serverurl=unix:///var/run/supervisor.sock

[program:artisan]
command = php /data/artisan queue:work --queue=%(ENV_QUEUE)s --tries=%(ENV_TRIES)s --daemon
command = php /data/artisan queue:work --queue=%(ENV_QUEUE)s --tries=%(ENV_TRIES)s --delay=%(ENV_FAILDELAY)s --daemon
process_name = %(program_name)s_%(process_num)02d
autostart = true
autorestart = true
Expand Down

0 comments on commit 5a7068a

Please sign in to comment.