logger.info("find_best_next_schedulable_unit: units meeting constraints in window ['%s', '%s']: %s",lower_bound_start_time,upper_bound_stop_time,','.join([str(su.id)forsuinsorted(filtered_scheduling_units,key=lambdax:x.id)])or'None')
logger.info("find_best_next_schedulable_unit: units meeting constraints in window ['%s', '%s']: %s",lower_bound_start_time,upper_bound_stop_time,','.join([str(su.id)forsuinsorted(filtered_scheduling_units,key=lambdax:x.id)])or'None')
ifnotfiltered_scheduling_units:
returnNone
# then, check if there is a subset that can only run exclusively in this window and not later.
# then, check if there is a subset that can only run exclusively in this window and not later.
'''get a queryset of all scheduling_units which are observed or beyond (processing, ingesting, finished) and fall within the given [lower_bound, upper_bound) window (if not None)'''