From 8ee3fa6e5af2d02ac998e27fcc458690bc890373 Mon Sep 17 00:00:00 2001 From: Muhammad Farhan Date: Fri, 17 May 2019 04:53:27 +0530 Subject: [PATCH 1/3] runpool entity deleted --- src/routes/api/run.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/routes/api/run.ts b/src/routes/api/run.ts index 6097a2d..7c5903b 100644 --- a/src/routes/api/run.ts +++ b/src/routes/api/run.ts @@ -50,6 +50,8 @@ const handleTimeoutForSubmission = function (submissionId: number) { case 'callback': axios.post(job.callback, errorResponse) } + + delete runPool[submissionId] } const handleSuccessForSubmission = function (result: RunResponse) { @@ -79,6 +81,8 @@ const handleSuccessForSubmission = function (result: RunResponse) { })() break; } + + delete runPool[result.id] } /** @@ -172,7 +176,6 @@ route.post('/', (req, res, next) => { setTimeout(() => { if (runPool[submission.id]) { handleTimeoutForSubmission(submission.id) - delete runPool[submission.id] } }, config.RUN.TIMEOUT) @@ -198,7 +201,6 @@ route.post('/', (req, res, next) => { successListener.on('success', (result: RunResponse) => { if (runPool[result.id]) { handleSuccessForSubmission(result) - delete runPool[result.id] } Submissions.update({ end_time: new Date() From 7aa606fde214b8a23e4f994094ba1e3bea9206e2 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2020 03:48:17 +0000 Subject: [PATCH 2/3] chore(package): update rimraf to version 3.0.1 Closes #42 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 21ff830..1ccd912 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "mocha": "^5.0.0", "nyc": "^12.0.1", "request": "^2.83.0", - "rimraf": "^2.6.2", + "rimraf": "^3.0.1", "ts-node": "^7.0.0", "typescript": "^2.6.1" }, From ec6d6925071c5b885635a49078d1f198bb6909ca Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" <23040076+greenkeeper[bot]@users.noreply.github.com> Date: Tue, 28 Jan 2020 03:48:26 +0000 Subject: [PATCH 3/3] chore(package): update lockfile yarn.lock --- yarn.lock | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/yarn.lock b/yarn.lock index db0dc65..162dcbb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1184,6 +1184,18 @@ glob@7.1.2, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + globals@^11.1.0: version "11.9.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" @@ -2446,6 +2458,13 @@ rimraf@^2.6.1, rimraf@^2.6.2: dependencies: glob "^7.0.5" +rimraf@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.1.tgz#48d3d4cb46c80d388ab26cd61b1b466ae9ae225a" + integrity sha512-IQ4ikL8SjBiEDZfk+DFVwqRK8md24RWMEJkdSlgNLkyyAImcjf8SWvU1qFMDOb4igBClbTQ/ugPqXcRwdFTxZw== + dependencies: + glob "^7.1.3" + safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"