summaryrefslogtreecommitdiff
path: root/example/example.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-02-26 18:09:01 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-02-26 18:09:01 +0300
commitc3fa113769dce4bd97ee4e3b193409d97b569534 (patch)
treee04a698758a66f1064177a686917caea4042882c /example/example.php
parentc8da2c8b3f5ef5c95dc7978a476a4830ca6d7c0e (diff)
examples: improve examples
Diffstat (limited to 'example/example.php')
-rw-r--r--example/example.php10
1 files changed, 6 insertions, 4 deletions
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();