Download the PHP package pierophp/laravel-queue-manager without Composer

On this page you can find all versions of the php package pierophp/laravel-queue-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-queue-manager

Laravel Queue Manager

The Laravel Queue Manager, manage the queue process worker.

It uses Supervisor as Process Control System.

It also has a scheduler system built-in.

Installation

Composer

Publish

Running the migration

If you have MySQL version before 5.7, change in the migration the field "schedule_config" from "json" to "text".

Adding the provider

You need to add the provider at the file config/app.php

Configuration

Generating a job

You need generate a class that extends LaravelQueueManager\AbstractJob.

It's necessary to implement 2 methods:

Method Description
getName() The name of the job
execute() The code of the job yourself

Dispatching a new job

You need create a new instance of your job and call the dispatch() method.

Or use the CLI:

You can set optional params too:

Database

To the job work correctly, it is necessary generate a row in the queue_config table.

Field Description
name It's the same of the return of the getName() method.
class_name The full path with namespace of your job class (\App\Jobs\TestJob)
active If the job is active or not
schedulable If the job is schedulable or not
schedule_config A JSON config of the schedule. {"method" : "The schedule methods from laravel", "params": "The params to the schedule method (optional)", "props": [ { "my_job_prop": 1 }, { "my_job_prop": 2 } ]}
max_attemps The max attempts of the queue
max_instances The max parallel instances of the queue
timeout The timeout of the queue
delay The delay to the next execution (Not implemented yet)
connection The connection name of the queue provider. (If null = default)
aggregator The aggregator is used to group the queues in a report
config The config is used to configure a dynamic functionality. Example json below
Config field example

Config

At the queue_manager.php config file you can configure:

Field Description Default
artisan_path The artisan path base_path('artisan')
log_path The log path storage_path('logs/worker.log')
supervisor_config_file The supervisor config file /etc/supervisor/conf.d/laravel-queue.conf
supervisor_bin The supervisor bin path /usr/bin/supervisorctl
supervisor_user The supervisor user docker
supervisor_update_timeout The supervisor update timeout to gracefully stop the process when a configuration change 600
execute_as_api Enable the queue as API mode false
api_url URL to run the queue as API mode http://127.0.0.1/queue/process
fallback_connections Array of fallback connections when first provider fails to dispatch []

Showing all available jobs

Getting error events

You need add to your AppServiceProvider and log as you like:

Deploying

Supervisor config

You need configure a cron to run as root every minute to generate the supervisor config

Scheduler

You need configure a cron to run every minute to generate the scheduler

Queue Restart

Every time you change the PHP code, it's necessary to restart the queues. Put this at your deploy script.

API Mode

Introduction

To easily scale your jobs machine, you can run the queues in API mode. An API is much more easy to apply auto-scale.

Configuration

In your route configuration file add:

Edit in your "queue_manager.php" config file the execute_as_api and api_url options.


All versions of laravel-queue-manager with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
illuminate/bus Version ^5.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/database Version ^5.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/http Version ^5.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/queue Version ^5.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0
illuminate/view Version ^5.3 || ^6.0 || ^7.0 || ^8.0 || ^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pierophp/laravel-queue-manager contains the following files

Loading the files please wait ....