2017 © Pedro Peláez
 

library laravel-async-queue

Async Queue Driver for Laravel (Push to background)

image

barryvdh/laravel-async-queue

Async Queue Driver for Laravel (Push to background)

  • Wednesday, June 13, 2018
  • by Barryvdh
  • Repository
  • 12 Watchers
  • 197 Stars
  • 71,271 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 50 Forks
  • 28 Open issues
  • 15 Versions
  • 9 % Grown

The README.md

Laravel 5 Async Queue Driver

Push a function/closure to the background.

For Laravel 5.4, check the 0.6 branch

For Laravel 5.3, check the 0.5 branch

Just like the 'sync' driver, this is not a real queue driver. It is always fired immediatly. The only difference is that the closure is sent to the background without waiting for the response. This package is more usable as an alternative for running incidental tasks in the background, without setting up a 'real' queue driver., (*1)

Note: This is using the DatabaseQueue, so make sure you set that up first, including migrations., (*2)

Install

Require the latest version of this package with Composer, (*3)

composer require barryvdh/laravel-async-queue

Add the Service Provider to the providers array in config/app.php, (*4)

Barryvdh\Queue\AsyncServiceProvider::class,

You need to create the migration table for queues and run it., (*5)

$ php artisan queue:table
$ php artisan migrate

You should now be able to use the async driver in config/queue.php. Use the same config as for the database, but use async as driver., (*6)

'connections' => array(
    ...
    'async' => array(
        'driver' => 'async',
        'table' => 'jobs',
        'queue' => 'default',
        'expire' => 60,
    ),
    ...
}

Set the default to async, either by changing to config or setting QUEUE_DRIVER in your .env file to async., (*7)

Note: By default, php is used as the binary path to PHP. You can change this by adding the binary option to the queue config. You can also add extra arguments (for HHVM for example), (*8)

'connections' => array(
    ...
    'async' => array(
        'driver' => 'async',
        'table' => 'jobs',
        'queue' => 'default',
        'expire' => 60,
        'binary' => 'php',
        'binary_args' => '',
    ),
    ...
}

It should work the same as the sync driver, so no need to run a queue listener. Downside is that you cannot actually queue or plan things. Queue::later() is also fired directly. For more info see http://laravel.com/docs/queues, (*9)

The Versions

13/06 2018

dev-master

9999999-dev

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

30/04 2018

v0.7.1

0.7.1.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

18/12 2017

0.3.x-dev

0.3.9999999.9999999-dev

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

18/12 2017

v0.3.2

0.3.2.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

01/09 2017

v0.7.0

0.7.0.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

04/04 2017

v0.6.0

0.6.0.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

18/11 2016

v0.5.0

0.5.0.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

23/08 2016

v0.4.2

0.4.2.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

29/02 2016

v0.4.1

0.4.1.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

07/08 2015

v0.4.0

0.4.0.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

18/02 2015

v0.3.1

0.3.1.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

26/11 2014

v0.3.0

0.3.0.0

Async Queue Driver for Laravel (Push to background)

  Sources   Download

MIT

The Requires

 

laravel queue async background

29/04 2014

v0.1.0

0.1.0.0

  Sources   Download

The Requires