Implemented RabbitMQ and Refactored Client & Worker (WIP)
This commit is contained in:
parent
d15da30813
commit
6d8d4a75a4
13 changed files with 966 additions and 170 deletions
18
tests/rabbitmq_client.php
Normal file
18
tests/rabbitmq_client.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
|
||||
use Tamer\Objects\Task;
|
||||
|
||||
require 'ncc';
|
||||
|
||||
import('net.nosial.tamerlib', 'latest');
|
||||
|
||||
$client = new \Tamer\Protocols\RabbitMq\Client('guest', 'guest');
|
||||
$client->addServer('127.0.0.1', 5672);
|
||||
|
||||
// Loop through 10 tasks
|
||||
|
||||
for($i = 0; $i < 500; $i++)
|
||||
{
|
||||
$client->do(new Task('sleep', '5'));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue