Skip to content

Commit

Permalink
[APERO] Deal with trigger run and idb_len=0 v0.8 [Issue #776]
Browse files Browse the repository at this point in the history
  • Loading branch information
njcuk9999 committed Aug 22, 2024
1 parent 9997c22 commit d65e892
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions apero/tools/module/processing/drs_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,16 @@ def generate_run_from_sequence(params: ParamDict, sequence,
# ------------------------------------------------------------------
# get length of database at this point
idb_len = indexdb.database.count(condition=ref_condition)
# need to deal with being a trigger run
if 'TRIGGER_RUN' in params:
trigger_cond = drs_text.true_text(params['TRIGGER_RUN'])
# test whether we need to stop here
if trigger_cond and idb_len == 0:
# display message that we stopped here as no files were found
wmsg = 'No files found for trigger run'
WLOG(params, 'info', wmsg)
# stop processing recipes
return []
# deal with empty database (after conditions)
if idb_len == 0:
eargs = [ref_condition, func_name]
Expand All @@ -1846,6 +1856,7 @@ def generate_run_from_sequence(params: ParamDict, sequence,
if not response:
WLOG(params, 'error', 'User chose to exit')
raise SystemExit()

# log that we are processing recipes
if logmsg:
WLOG(params, 'info', textentry('40-503-00037', args=[idb_len]))
Expand Down

0 comments on commit d65e892

Please sign in to comment.