/** * @return \Venne\Queue\Worker */ private function getWorker() { try { return $this->workerManager->getWokrer($this->id); } catch (InvalidArgumentException $e) { throw new BadRequestException(); } }
/** * @param int $id */ public function tableStopClick($id) { $worker = $this->workerManager->getWokrer($id); $this->workerManager->stopWorker($worker); $this->redirect('this'); }