aboutsummaryrefslogtreecommitdiff
path: root/src/WorkerClient.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-03 02:17:49 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-03 02:17:49 +0300
commit61d008200024e3e1a81aafccadea205c9024cda0 (patch)
tree439d2e52e9f08793491b6b976860942e9b4a1165 /src/WorkerClient.php
parent0e564d2812758bb532588390eb878a080402993c (diff)
support pause()/continue(), fix poll(), other fixes
Diffstat (limited to 'src/WorkerClient.php')
-rw-r--r--src/WorkerClient.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/WorkerClient.php b/src/WorkerClient.php
index 240c200..7650df6 100644
--- a/src/WorkerClient.php
+++ b/src/WorkerClient.php
@@ -25,10 +25,14 @@ class WorkerClient extends Client {
* @return ResponseMessage
* @throws \Exception
*/
- public function poll(array $targets): ResponseMessage
+ public function poll(array $targets = []): ResponseMessage
{
+ $data = [];
+ if (!empty($targets))
+ $data['targets'] = $targets;
+
return $this->recv(
- $this->sendRequest(new RequestMessage('poll', ['targets' => $targets]))
+ $this->sendRequest(new RequestMessage('poll', $data))
);
}