PHP Classes

File: sample/publisher-sample-with-queue-config.php

Recommend this page to a friend!
  Classes of Leonardo Di Sarli   Taurus Publisher PHP Redis Client Library   sample/publisher-sample-with-queue-config.php   Download  
File: sample/publisher-sample-with-queue-config.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Taurus Publisher PHP Redis Client Library
Send jobs to a Redis server using LUA scripts
Author: By
Last change:
Date: 10 months ago
Size: 437 bytes
 

Contents

Class file image Download
<?php

require_once __DIR__ . '/../vendor/autoload.php';

use
TaurusPublisher\TaurusPublisher;

$queue = 'test';
$data = [
   
'publisher' => 'example',
];

$taurus = new TaurusPublisher();

print_r('Publish');
echo
PHP_EOL;

$queueConfig = [
   
'attempts' => 4,
   
'backoff' => 20000,
   
'delay' => 1,
   
'removeOnComplete' => 20,
];

$result = $taurus->add(
   
$queue,
   
$data,
   
$queueConfig
);

print_r($result);
echo
PHP_EOL;