PHP code example of ilzrv / php-bull-queue

1. Go to this page and download the library: Download ilzrv/php-bull-queue 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/ */

    

ilzrv / php-bull-queue example snippets




use Ilzrv\PhpBullQueue\Queue;

$videoQueue = new Queue('videoQueue');

$videoQueue->add(Queue::DEFAULT_JOB_NAME, [
    'video' => 'http://example.com/video1.mov'
]);



use Ilzrv\PhpBullQueue\Queue;
use Ilzrv\PhpBullQueue\DTOs\QueueOpts;
use Ilzrv\PhpBullQueue\DTOs\RedisConfig;

$videoQueue = new Queue(
    'videoQueue',
    new QueueOpts([
        'redis' => new RedisConfig([
            'client' => 'predis',
            'host' => '127.0.0.1',
            'port' => 6379,
            'password' => '',
        ]),
    ])
);

$videoQueue->add(Queue::DEFAULT_JOB_NAME, [
    'video' => 'http://example.com/video1.mov'
]);

bash
composer