Skip to content

Commit c901fcf

Browse files
committed
Better logging why online effort did not run
1 parent ec6f2ea commit c901fcf

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

omicron/cli/process.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ def main(args=None):
737737
if newdag and online:
738738
# get limit of available data (allowing for padding)
739739
end = data.get_latest_data_gps(ifo, frametype) - padding
740+
logger.info(f'Last available frame data: {gps_to_hr(end)}')
740741
now = tconvert()
741742
earliest_online = now - max_lookback
742743
try: # start from where we got to last time
@@ -746,6 +747,10 @@ def main(args=None):
746747
logger.warning(f'Segments.txt produced a start time for this run before max-lookback {max_lookback}\n'
747748
f' Found {gps_to_hr(start)} earliest is {gps_to_hr(earliest_online)}')
748749
start = earliest_online
750+
if end < start:
751+
# this happens when the available frames end before the max lookbak period
752+
logger.warning(f'Available data ends {gps_to_hr(end)} before lookback starts'
753+
f' {gps_to_hr(earliest_online)}')
749754
else:
750755
logger.debug(f"Online segment record recovered: {gps_to_hr(last_run_segment[0])} - "
751756
f"{gps_to_hr(last_run_segment[1])}")
@@ -763,7 +768,6 @@ def main(args=None):
763768
elif online:
764769
start, end = segments.get_last_run_segment(segfile)
765770
if end - start > max_lookback:
766-
767771
start = end - max_lookback
768772
else:
769773
logger.debug(f"Online segment record recovered: {gps_to_hr(start)} - {gps_to_hr(end)}")
@@ -792,8 +796,10 @@ def main(args=None):
792796

793797
# validate span is long enough
794798
if dataduration < minduration and online:
795-
logger.info("Segment is too short (%d < %d), please try again later"
796-
% (duration, minduration))
799+
if dataduration < 0:
800+
logger.info(f'Frame data is not available for interval {gps_to_hr(start)} to {gps_to_hr(end)}')
801+
else:
802+
logger.info(f"Segment is too short ({duration} < {minduration}), please try again later")
797803
clean_dirs(run_dir_list)
798804
clean_exit(0, tempfiles)
799805
elif dataduration < minduration:

0 commit comments

Comments
 (0)