The motivation for creating this package is to allow working with queues in a shared hosting environment.
compoer require descom/laravel-supervisor-queue
php artisan vendor:publish --provider="Descom\Supervisor\SupervisorServiceProvider" --tag="config"
This is the contents of the published config file:
<?php
return [
'workers' => [
'default' => [
'options' => [
// 'sleep' => 3,
// 'tries' => 3,
// 'max-time' => 3600,
],
// 'connection' => 'database',
// 'enabled' => false,
],
// 'other_worker' => [
// 'options' => [max-time' => 3600],
// 'connection' => 'sqs',
// ],
],
'schedule' => [
'start' => [
'enabled' => true,
// 'cron' => '* * * * *',
],
],
];
php artisan supervisor:status
php artisan supervisor:start
php artisan supervisor:stop
php artisan supervisor:restart
use Descom\Supervisor\Service;
Service::status();
Service::start();
Service::stop();
Service::restart();