https://github.com/fdjrr/queue
Simple Laravel Queue Job
https://github.com/fdjrr/queue
Last synced: about 15 hours ago
JSON representation
Simple Laravel Queue Job
- Host: GitHub
- URL: https://github.com/fdjrr/queue
- Owner: fdjrr
- Created: 2024-01-14T01:50:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-14T02:27:38.000Z (almost 2 years ago)
- Last Synced: 2025-01-18T00:49:17.498Z (11 months ago)
- Language: PHP
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Simple Laravel Queue Job
## Installation
```bash
$ git clone https://github.com/fdjrr/queue.git
$ cd queue
$ composer update
$ cp .env .env.example
$ php artisan key:generate
$ php artisan migrate
```
## Configuration
```bash
FILESYSTEM_DISK=public
QUEUE_CONNECTION=database
```
## Installing Supervisor
```bash
$ sudo apt-get install supervisor
```
## Configuring Supervisor
```bash
$ sudo nano /etc/supervisor/conf.d/laravel-worker.conf
```
```bash
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /home/forge/app.com/artisan queue:work --sleep=3 --tries=3 --max-time=3600
autostart=true
autorestart=true
stopasgroup=true
killasgroup=true
user=forge
numprocs=8
redirect_stderr=true
stdout_logfile=/home/forge/app.com/worker.log
stopwaitsecs=3600
```
## Starting Supervisor
```bash
$ sudo supervisorctl reread
$ sudo supervisorctl update
$ sudo supervisorctl start "laravel-worker:*"
```
## Restarting and Reloading
```bash
$ sudo supervisorctl restart "laravel-worker:*"
```