Skip to content

Commit

Permalink
Start streaming immediately on run
Browse files Browse the repository at this point in the history
  • Loading branch information
calum-chamberlain committed Dec 14, 2023
1 parent 1fb7f33 commit fb9b942
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions rt_eqcorrscan/rt_match_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,12 @@ def run(
The party created - will not contain detections expired by
`keep_detections` threshold.
"""
# First: start collecting data NOW
# Get this locally before streaming starts
buffer_capacity = self.rt_client.buffer_capacity
# Start the streamer
self._start_streaming()

# Update backfill start time
self._last_backfill_start = UTCDateTime.now()
restart_interval = 600.0
Expand Down Expand Up @@ -720,10 +726,6 @@ def run(
detect_directory = detect_directory.format(name=self.name)
if not os.path.isdir(detect_directory):
os.makedirs(detect_directory)
# Get this locally before streaming starts
buffer_capacity = self.rt_client.buffer_capacity
# Start the streamer
self._start_streaming()

Logger.info("Detection will use the following data: {0}".format(
self.expected_seed_ids))
Expand Down

0 comments on commit fb9b942

Please sign in to comment.