summaryrefslogtreecommitdiff
path: root/example/example.php
diff options
context:
space:
mode:
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();