PHP code example of heristop / jobqueue-bundle

1. Go to this page and download the library: Download heristop/jobqueue-bundle 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/ */

    

heristop / jobqueue-bundle example snippets


    $bundles[] = new Heri\Bundle\JobQueueBundle\HeriJobQueueBundle();

    $queue = $this->get('jobqueue');
    $queue->attach('queue1');
    
    $queue->push([
        'command' => 'cache:clear'
    ]);

    $queue
        ->highPriority()
        ->push([
            'command' => 'cache:clear',
        ]);