Skip to content

Commit

Permalink
Ignore shutil error and added task finished info
Browse files Browse the repository at this point in the history
  • Loading branch information
kshitijrajsharma committed Dec 22, 2023
1 parent a6fb2c3 commit 3690148
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions API/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def get_task_status(task_id):
"id": task_id,
"status": task_result.state,
"result": task_result.result if task_result.status == "SUCCESS" else None,
"finished_at": task_result.date_done if task_result.date_done else None,
}
return JSONResponse(result)

Expand Down
2 changes: 1 addition & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ def __init__(self, params):
self.iso3.upper() if self.iso3 else self.params.dataset.dataset_prefix,
)
if os.path.exists(self.default_export_path):
shutil.rmtree(self.default_export_path)
shutil.rmtree(self.default_export_path, ignore_errors=True)
os.makedirs(self.default_export_path)
self.duck_db_db_path = os.path.join(
self.default_export_path,
Expand Down

0 comments on commit 3690148

Please sign in to comment.