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

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());
}

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