| 1 | <?php |
||
| 14 | class Controller |
||
| 15 | { |
||
| 16 | use TimeTrait; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var MessageQueueGateway |
||
| 20 | */ |
||
| 21 | private $gateway; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @param MessageQueueGateway $gateway |
||
| 25 | */ |
||
| 26 | 2 | public function __construct(MessageQueueGateway $gateway) |
|
| 30 | |||
| 31 | /** |
||
| 32 | * @Route("/jobs/{type}/", name="status.jobs.type", methods="GET") |
||
| 33 | * @param Request $request |
||
| 34 | * @param string $type |
||
| 35 | * @return Job[] |
||
| 36 | */ |
||
| 37 | 1 | public function getJobs(Request $request, string $type) : array |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @Route("/jobs/{eventId}:{jobId}/", methods="DELETE", name="messageQueue.deleteJob", requirements={"jobId":"\d+"}) |
||
| 50 | * @param Request $request |
||
| 51 | * @param string $eventType |
||
| 52 | * @param int $jobId |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | 1 | public function deleteJob(Request $request, string $eventType, int $jobId) : bool |
|
| 61 | } |
||
| 62 |