Download the PHP package heristop/jobqueue-bundle without Composer

On this page you can find all versions of the php package heristop/jobqueue-bundle. 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 jobqueue-bundle

JobQueueBundle

SensioLabsInsight Scrutinizer Code Quality Build Status

This bundle provides the use of Zend Queue from Zend Framework. It allows your Symfony 2/3 application to schedule multiple console commands as server-side jobs.

See the Programmer's Reference Guide for more information.

Features:

Installation

Require heristop/jobqueue-bundle to your composer.json file:

Load the bundle in AppKernel:

If you use the Doctrine adapter, update your database:

If you use the Amqp adapter, you may configure the connection in this way:

Usage

First, define a message which contains the Symfony command to call. For instance, we choose to add the clear command in a queue named "queue1":

You can also call commands with arguments:

Then, add the queue to listen in the configuration:

Note: The queue is automatically created, but you can also use the command-line interface in this way:

Listener Commands

Run the Listener

To run new messages pushed into the queue, execute this command:

Specify a specific Queue

You may specify which queue connection the listener should utilize (skipping configuration):

Specify the Sleep Duration

You may also specify the number of seconds to wait before polling for new jobs:

Process the first Job on the Queue

To process only the first job on the queue, you may use the jobqueue:work command:

Show Jobs

To see the pending jobs, run the command below:

Failed Jobs

If a job failed, the exception is logged in the database, and the command is call again after the setted timeout (default 90 seconds):

ScreenShot

To delete all of your failed jobs, you may use the jobqueue:flush command:

Jobs Priority

Jobs are executed in the order in which they are scheduled (assuming they are in the same queue). You may also prioritize a call:

Jobs Monitoring

If you use the Doctrine Adapter, you may use Sonata Admin to monitor your jobs:

ScreenShot

Retry strategy

By default, number of excecution of failed messages is endless. If you use the Doctrine Adapter you may edit the max number of retries on queue table.

To retry all of your failed jobs, you may use this command:

If you would like to delete a failed job, you may use this command:

Configure a daemon

The jobqueue:listen command should be runned with the prod environnement and the quiet option to hide output messages:

To avoid a memory leak caused by the monolog fingers crossed handler, you may configure the limit buffer size on config_prod.yml:

Linux ProTip:

To run the command as a service, edit jobqueue-service shell in Resources/bin. Set the correct PROJECT_ROOT_DIR value, and copy this file to /etc/init.d.

Then use update-rc.d:

To remove the service, use this command:

If the service stopped suddenly, you may use supervisord to restart it automatically.

A sample config might look like this:


All versions of jobqueue-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
symfony/framework-bundle Version ~2.7|~3.0
symfony/finder Version ~2.7|~3.0
symfony/console Version ~2.7|~3.0
zendframework/zend-queue Version 2.0.*@dev
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 heristop/jobqueue-bundle contains the following files

Loading the files please wait ....