This repository was archived by the owner on Feb 13, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -111,6 +111,11 @@ def generic_scheduler_flow_logic(
111111 database_flow_info = construct_child_flow_info (parent_files , children_files ,
112112 pipeline_config , session = session ,
113113 reference_time = reference_time , ** args_dictionary )
114+ # We've had some failures where a flow reports "no associated files", despite the output files having
115+ # their processing_flow set properly. Best guess is the DB is running slow, and so the new flow has been
116+ # committed but the files' processing_flow hasn't been updated yet. So let's not let the state be
117+ # 'planned' until everything is in place.
118+ database_flow_info .state = 'being_planned'
114119 if backprocess_cutoff := pipeline_config .get ('prioritize_most_recent_n_days' , None ):
115120 cutoff = datetime .now (UTC ) - timedelta (days = backprocess_cutoff )
116121 if all (cf .date_obs .replace (tzinfo = UTC ) < cutoff for cf in children_files ):
@@ -138,5 +143,7 @@ def generic_scheduler_flow_logic(
138143 for parent_file , child_file in iterable :
139144 session .add (FileRelationship (parent = parent_file .file_id , child = child_file .file_id ))
140145
146+ database_flow_info .state = 'planned'
147+
141148 session .commit ()
142149 return len (ready_files )
You can’t perform that action at this time.
0 commit comments