From dc2fff8a678df1dbbd2a87d6e7fefa9bb036347c Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Thu, 11 Mar 2021 01:37:53 +0300 Subject: update readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7f2379e..fd01fd1 100644 --- a/README.md +++ b/README.md @@ -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"); } -- cgit v1.2.3