Example #1
0
 public function testRoundtrip()
 {
     $pm = new ProtocolMessage('12345', '!dlrow olleh');
     $pm2 = ProtocolMessage::fromMessage($pm->toMessage());
     $this->assertEquals($pm, $pm2);
 }
Example #2
0
 public function handleWorkerResult(Worker $worker, JobResult $msg)
 {
     $this->getLogger()->debug('Worker ' . $worker->getHexId() . ' has a result for request ' . $msg->getRequestId() . '.');
     $this->storeResult($worker, $msg->getRequestId(), $msg->getResult());
     $this->reply($worker, new HeartbeatResponseWorkerhandler());
 }