summaryrefslogtreecommitdiff
path: root/tests/sleep-ttl.php
blob: 2230e6154435e1b13fd632d83f427eca20faf720 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

declare(strict_types=1);

use Spiral\Goridge\StreamRelay;
use Spiral\RoadRunner\Worker as RoadRunner;

require __DIR__ . "/vendor/autoload.php";

$rr = new RoadRunner(new StreamRelay(\STDIN, \STDOUT));

while($rr->waitPayload()){
    sleep(10);
    $rr->respond(new \Spiral\RoadRunner\Payload("hello world"));
}