recv( $this->sendRequest(new RequestMessage('status')) ); } /** * @param string[] $targets * @return ResponseMessage * @throws \Exception */ public function poll(array $targets = []): ResponseMessage { $data = []; if (!empty($targets)) $data['targets'] = $targets; return $this->recv( $this->sendRequest(new RequestMessage('poll', $data)) ); } /** * @param int[] $ids * @return ResponseMessage * @throws \Exception */ public function runManual(array $ids): ResponseMessage { return $this->recv( $this->sendRequest(new RequestMessage('run-manual', ['ids' => $ids])) ); } /** * @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 ])) ); } }