Skip to content

Commit

Permalink
try to remove temp directory
Browse files Browse the repository at this point in the history
  • Loading branch information
IKCAP committed Sep 13, 2024
1 parent 1f2874d commit b856c36
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/classes/localex/seed-execution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,6 @@ module.exports = async (job: any) => {

seed.execution.results = results;
}

// Remove temporary directory
// fs.removeSync(tempdir);
} catch (e) {
error = "ERROR: " + e;
const logstream = fs.createWriteStream(logstdout, { 'flags': 'a' });
Expand All @@ -395,6 +392,13 @@ module.exports = async (job: any) => {
logstream.close();
}

try {
// Remove temporary directory
fs.removeSync(tempdir);
} catch (e) {
console.log("Error removing temporary directory: " + tempdir)
}

// Set the execution status
seed.execution.status = "SUCCESS";
seed.execution.end_time = new Date();
Expand Down

0 comments on commit b856c36

Please sign in to comment.