Implemented RabbitMQ and Refactored Client & Worker (WIP)

This commit is contained in:
Netkas 2023-02-02 21:09:45 -05:00
parent d15da30813
commit 6d8d4a75a4
13 changed files with 966 additions and 170 deletions

View file

@ -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');
});