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.
This commit is contained in:
Thomas Hobson 2021-08-20 01:05:13 +12:00 committed by GitHub
parent 5cd84ae816
commit 2386684a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -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();
}
}