Skip to content

Commit 9b0b28d

Browse files
committed
Add completion timestamp logging to pipeline_basic function
1 parent 8a92e69 commit 9b0b28d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

face_rhythm/pipelines.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,13 @@ def pipeline_basic(params):
382382
########################################
383383

384384
print(f'RUN COMPLETE')
385+
386+
## Save a small file with 'SCRIPT_COMPLETED__<datetime YMD_HMS>.txt' in the project directory.\
387+
## This is useful for tracking when the run was completed and if it was successful.
388+
from datetime import datetime
389+
path_run_complete = str(Path(directory_project) / 'SCRIPT_COMPLETED__' + datetime.now().strftime("%Y%m%d_%H%M%S") + '.txt')
390+
with open(path_run_complete, 'w') as f:
391+
f.write(f'{datetime.now().strftime("%Y-%m-%d %H:%M:%S")}')
385392

386393
results = {
387394
'path_config': path_config,

0 commit comments

Comments
 (0)