Refactored Interfaces and implemented Tamer, Gearman's protocol has been refactored by RabbitMQ needs refactoring
This commit is contained in:
parent
6d8d4a75a4
commit
c80b4b39c4
21 changed files with 1103 additions and 360 deletions
20
tests/tamer_worker.php
Normal file
20
tests/tamer_worker.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
use Tamer\Abstracts\Mode;
|
||||
use Tamer\Abstracts\ProtocolType;
|
||||
use Tamer\Tamer;
|
||||
|
||||
require 'ncc';
|
||||
|
||||
import('net.nosial.tamerlib', 'latest');
|
||||
|
||||
Tamer::connect(ProtocolType::Gearman, Mode::Worker,
|
||||
['127.0.0.1:4730']
|
||||
);
|
||||
|
||||
Tamer::addFunction('sleep', function(\Tamer\Objects\Job $job) {
|
||||
sleep($job->getData());
|
||||
return $job->getData();
|
||||
});
|
||||
|
||||
Tamer::work();
|
Loading…
Add table
Add a link
Reference in a new issue