PHP code example of arrounded / queues

1. Go to this page and download the library: Download arrounded/queues library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

arrounded / queues example snippets


Arrounded\Queues\ServiceProvider::class

'Queues' => Arrounded\Queues\Facades\Queues::class,

Queues::on('foo')->uses(Foobar::class)->push()

Queues::on('foo')->uses(Foobar::class)->priority(Queues::PRIORITY_HIGH)->push();

Queues::on('foo')->uses(Foobar::class)->with([
	'bar' => 'foo'
])->push();

Queues::on('foo')->uses(Foobar::class)->delay(10)->push();

$this->app['queues']->setPrefix('foobar') // foobar_foo_normal

// To disable
$this->app['queues']->disabled()

// To re-enable
$this->app['queues']->disabled(false)

use Arrounded\Queues\Queues;

class FooService
{
	public function __construct(Queues $queues)
	{
		$this->queues = $queues;
	}