@@ -737,6 +737,7 @@ def main(args=None):
737
737
if newdag and online :
738
738
# get limit of available data (allowing for padding)
739
739
end = data .get_latest_data_gps (ifo , frametype ) - padding
740
+ logger .info (f'Last available frame data: { gps_to_hr (end )} ' )
740
741
now = tconvert ()
741
742
earliest_online = now - max_lookback
742
743
try : # start from where we got to last time
@@ -746,6 +747,10 @@ def main(args=None):
746
747
logger .warning (f'Segments.txt produced a start time for this run before max-lookback { max_lookback } \n '
747
748
f' Found { gps_to_hr (start )} earliest is { gps_to_hr (earliest_online )} ' )
748
749
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 )} ' )
749
754
else :
750
755
logger .debug (f"Online segment record recovered: { gps_to_hr (last_run_segment [0 ])} - "
751
756
f"{ gps_to_hr (last_run_segment [1 ])} " )
@@ -763,7 +768,6 @@ def main(args=None):
763
768
elif online :
764
769
start , end = segments .get_last_run_segment (segfile )
765
770
if end - start > max_lookback :
766
-
767
771
start = end - max_lookback
768
772
else :
769
773
logger .debug (f"Online segment record recovered: { gps_to_hr (start )} - { gps_to_hr (end )} " )
@@ -792,8 +796,10 @@ def main(args=None):
792
796
793
797
# validate span is long enough
794
798
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" )
797
803
clean_dirs (run_dir_list )
798
804
clean_exit (0 , tempfiles )
799
805
elif dataduration < minduration :
0 commit comments