PHP code example of zxin / php-rq
1. Go to this page and download the library: Download zxin/php-rq 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/ */
zxin / php-rq example snippets
$queue = new \PhpRQ\Queue($predisConnection);
$items = $queue->safeExecution(
function() use ($queue) {$queue->getItems(1);},
function($returnValue) { /* what should happen in case of success */ },
function() { /* what should happen in case of failure */ },
$retryWait, // Microseconds to wait between retries.
$maxAttempts // Maximal count of attempts.
);