From ca3a3633e9a1448e20f11ae026460a468fe9c0b6 Mon Sep 17 00:00:00 2001 From: Terry Cain Date: Sun, 22 Oct 2017 13:36:23 +0100 Subject: [PATCH] Called terminatejob from canceljob --- moto/batch/responses.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/moto/batch/responses.py b/moto/batch/responses.py index 96094068d..e626b7d4c 100644 --- a/moto/batch/responses.py +++ b/moto/batch/responses.py @@ -293,12 +293,4 @@ class BatchResponse(BaseResponse): # CancelJob def canceljob(self): # Theres some AWS semantics on the differences but for us they're identical ;-) - job_id = self._get_param('jobId') - reason = self._get_param('reason') - - try: - self.batch_backend.terminate_job(job_id, reason) - except AWSError as err: - return err.response() - - return '' + return self.terminatejob()