From 1e2bf773af6b4f95497997638ea97c5b17382ddd Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Tue, 2 Mar 2021 21:31:08 +0300 Subject: MasterClient: support poll_workers argument of status() request --- src/MasterClient.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/MasterClient.php') diff --git a/src/MasterClient.php b/src/MasterClient.php index 6a7902b..d2a8712 100644 --- a/src/MasterClient.php +++ b/src/MasterClient.php @@ -4,6 +4,10 @@ namespace jobd; class MasterClient extends Client { + public function __construct(int $port = Client::MASTER_PORT, ...$args) { + parent::__construct($port, ...$args); + } + /** * @param array $targets * @return ResponseMessage @@ -17,13 +21,14 @@ class MasterClient extends Client { } /** + * @param bool $poll_workers * @return ResponseMessage * @throws \Exception */ - public function status(): ResponseMessage + public function status(bool $poll_workers = false): ResponseMessage { return $this->recv( - $this->sendRequest(new RequestMessage('status')) + $this->sendRequest(new RequestMessage('status', ['poll_workers' => $poll_workers])) ); } -- cgit v1.2.3