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
|
@ -2,14 +2,14 @@
|
|||
|
||||
require 'ncc';
|
||||
|
||||
use Tamer\Objects\JobResults;
|
||||
use Tamer\Objects\Task;
|
||||
import('net.nosial.tamerlib', 'latest');
|
||||
|
||||
import('net.nosial.tamerlib', 'latest');
|
||||
|
||||
$client = new \Tamer\Protocols\GearmanClient();
|
||||
$client = new \Tamer\Protocols\Gearman\Client();
|
||||
$client->addServer();
|
||||
|
||||
$client->closure(function () {
|
||||
echo "This function was sent from a client, it should be executed on the worker";
|
||||
$client->doClosure(function () {
|
||||
require 'ncc';
|
||||
import('net.nosial.loglib', 'latest');
|
||||
|
||||
\LogLib\Log::info('gearman_closure.php', 'closure');
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue