diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-03-11 01:37:53 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-03-11 01:37:53 +0300 |
commit | dc2fff8a678df1dbbd2a87d6e7fefa9bb036347c (patch) | |
tree | 47a8e6fd53186bf99d10357521435597e1787ac3 | |
parent | 517160645d75e5e7c94a99087630b9c3fc0c3823 (diff) |
update readme
-rw-r--r-- | README.md | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -11,14 +11,14 @@ composer require ch1p/jobd-client ## Usage -The API is compact and simple, just read the code of `Client.php`. +The API is compact and simple, just read `WorkerClient.php` and `MasterClient.php`. Here's a small example. ```php try { - $jobd = new jobd\Client(jobd\Client::MASTER_PORT, '127.0.0.1'); -} catch (Exception $e) { + $jobd = new jobd\MasterClient(); +} catch (jobd\Exception $e) { die("Failed to connect.\n"); } @@ -28,7 +28,7 @@ try { // get status from master $status = $jobd->status()->getData(); -} catch (Exception $e) { +} catch (jobd\Exception $e) { die('jobd error: '.$e->getMessage()."\n"); } |