PHP code example of timur-flush / queue
1. Go to this page and download the library: Download timur-flush/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/ */
timur-flush / queue example snippets
use TimurFlush\Queue\Adapter\Beanstalk as BeanstalkQueue;
$di->setShared('queue', function() {
/* By default, Beanstalk uses IP 127.0.0.1 and Port 11300,
* but you can easily override them by passing new values
* to the constructor.
*/
return new BeanstalkQueue(
[
'host' => '127.0.0.1',
'port' => '11300',
//'persistent' => true, //if necessary
]
);
});