Skip to content

Instantly share code, notes, and snippets.

@vector-kerr
Created November 22, 2017 23:01
Show Gist options
  • Save vector-kerr/a8a680f8147c71d4b7b14e697dd94f34 to your computer and use it in GitHub Desktop.
Save vector-kerr/a8a680f8147c71d4b7b14e697dd94f34 to your computer and use it in GitHub Desktop.
Laravel Queue Worker PM2 Application Definition
#
# This file provides an application definition that can be used with
# PM2 ("Production Process Manager").
#
# PM2 "allows you to keep applications alive forever, to reload them
# without downtime and to facilitate common system admin tasks."
#
# Use this file by running it with PM2. For example:
# $> pm2 start laravel-queue-worker.pm2.yml
#
# Then you can use PM2 commands to manage the process:
# $> pm2 restart "my-laravel-queue-worker"
# $> pm2 status "my-laravel-queue-worker"
# $> pm2 logs "my-laravel-queue-worker"
#
apps:
- name: my-laravel-queue-worker
script: artisan
exec_mode: fork
interpreter: php
instances: 4
args:
- queue:work
- --tries=5
- --sleep=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment