summaryrefslogtreecommitdiff
path: root/example/example.php
blob: 82517056ff618a95c4e6acdb5135c3f5eda63be2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

require_once 'vendor/autoload.php';

ini_set('display_errors', 1);
error_reporting(E_ALL);

try {
    // connecting to jobd
    $client = new jobd\Client(jobd\Client::MASTER_PORT);

    // asking master to ask workers responsible for server1 to poll new jobs
    $resp = $client->poke(['server1']);
    var_dump($resp);
} catch (Exception $e) {
    die("error: ".$e->getMessage());
}

// closing connection
$client->close();