Adding one
Command — the full command line. Use the full path to PHP,/usr/bin/php8.4 artisan queue:work, rather than php. Bare php gets
the machine’s CLI default, which may not be the
version the site runs.
Directory — where it runs, normally the site’s current symlink so that
restarting after a deploy picks up the new release.
Processes — how many copies to run. Four queue workers is four processes of
one daemon rather than four daemons.
Name is yours, and is what the daemon’s log file is named after.
The queue worker shortcut
A site with a queue worker in its capabilities offers Add queue worker, which fills the command, the directory and the PHP version in from the site. It is the same daemon either way.Restarting and deploying
Saving a daemon rewrites its Supervisor program and restarts it. A restart signals the process rather than killing it, and waits. A queue worker given that signal finishes the job it is holding and exits, which is the difference between a clean restart and a job that runs twice. The whole group goes down together, so a restart never leaves one of four workers running the previous release.A deployment does not restart daemons. A queue worker holds its code and its
configuration until it restarts, so a deploy that changes either needs the
worker restarting — either from here, or with
queue:restart in the
deploy script.Logs
Each daemon writes to its own file under/var/log/shipways, readable from the
row and from the Logs tab. They are rotated weekly, and four
weeks are kept — logs from a daemon restarting in a loop will fill a disk given
long enough.