Skip to content

Commit a0359ac

Browse files
committed
Adds support for reprting outcome
(Should have committed before)
1 parent 7928adb commit a0359ac

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/server/api/.optic/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
captures/

src/server/pipeline/flow_script.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ def start_flow():
1515

1616
if (not job_id):
1717
current_app.logger.info('Failed to get job_id')
18+
job_outcome = 'busy'
19+
1820
else:
1921
log_db.log_exec_status(job_id, 'start_flow', 'executing', '')
2022

@@ -72,6 +74,13 @@ def start_flow():
7274
pdp.archived_date IS NULL
7375
''')
7476

75-
current_app.logger.info('Finished flow script run')
77+
current_app.logger.info('Finished flow script run')
78+
job_outcome = 'completed'
79+
80+
else: # No files in list
81+
current_app.logger.info('No files to process')
82+
job_outcome = 'nothing to do'
83+
84+
log_db.log_exec_status(job_id, 'flow', 'complete', '' )
7685

77-
log_db.log_exec_status(job_id, 'flow', 'complete', '' )
86+
return job_outcome

0 commit comments

Comments
 (0)