summaryrefslogtreecommitdiff
path: root/src/WorkerClient.php
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2021-03-05 02:59:03 +0300
committerEvgeny Zinoviev <me@ch1p.io>2021-03-05 02:59:03 +0300
commit80abae2885d758ba1e5b5835e88d62b0b16701e6 (patch)
tree04be4ce629cd2c66b29749ace1682ff16786948a /src/WorkerClient.php
parent7e7187ed4a7ca6e30f433929568f222b34039310 (diff)
WorkerClient: add setTargetConcurrency()
Diffstat (limited to 'src/WorkerClient.php')
-rw-r--r--src/WorkerClient.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/WorkerClient.php b/src/WorkerClient.php
index 7650df6..8b979af 100644
--- a/src/WorkerClient.php
+++ b/src/WorkerClient.php
@@ -48,4 +48,20 @@ class WorkerClient extends Client {
);
}
+ /**
+ * @param string $target
+ * @param int $concurrency
+ * @return ResponseMessage
+ * @throws Exception
+ */
+ public function setTargetConcurrency(string $target, int $concurrency): ResponseMessage
+ {
+ return $this->recv(
+ $this->sendRequest(new RequestMessage('set-target-concurrency', [
+ 'target' => $target,
+ 'concurrency' => $concurrency
+ ]))
+ );
+ }
+
} \ No newline at end of file