From 2386684a050109e5f5236bb340b805ac0a4c243c Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Fri, 20 Aug 2021 01:05:13 +1200 Subject: [PATCH] api: fix file cleanup edge case Processes could still be spawned writing files after the app has cleaned the dir out, and is ready to clear it out. Dumb edge case, but oh well. --- api/src/job.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/api/src/job.js b/api/src/job.js index bb78448..07a7ee4 100644 --- a/api/src/job.js +++ b/api/src/job.js @@ -280,10 +280,8 @@ class Job { async cleanup() { logger.info(`Cleaning up job uuid=${this.uuid}`); - await Promise.all([ - this.cleanup_processes(), - this.cleanup_filesystem(), - ]); + await this.cleanup_processes(); + await this.cleanup_filesystem(); } }