From c3fa113769dce4bd97ee4e3b193409d97b569534 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Fri, 26 Feb 2021 18:09:01 +0300 Subject: examples: improve examples --- example/example.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'example/example.php') diff --git a/example/example.php b/example/example.php index cc9cbd6..ca9e68c 100644 --- a/example/example.php +++ b/example/example.php @@ -3,12 +3,14 @@ require_once 'vendor/autoload.php'; try { + // connecting to jobd $client = new jobd\Client(jobd\Client::MASTER_PORT); + + // asking master to ask workers responsible for server1 to poll new jobs + $client->poke(['server1']); } catch (Exception $e) { die($e->getMessage()); } -// $status = $client->status(); -// var_dump($status->getData()); - -var_dump($client->poke(['server1'])); +// closing connection +$client->close(); -- cgit v1.2.3