From 03b856fbad7fcfad19521ecee504721aace7a9c5 Mon Sep 17 00:00:00 2001 From: Rebecca Ewing <ree55@psu.edu> Date: Fri, 9 Jun 2023 14:35:44 -0400 Subject: [PATCH] gstlal_ll_inspiral_event_uploader: rename duplicated heartbeat variable --- gstlal-inspiral/bin/gstlal_ll_inspiral_event_uploader | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gstlal-inspiral/bin/gstlal_ll_inspiral_event_uploader b/gstlal-inspiral/bin/gstlal_ll_inspiral_event_uploader index 06a521f314..16cb303e9a 100755 --- a/gstlal-inspiral/bin/gstlal_ll_inspiral_event_uploader +++ b/gstlal-inspiral/bin/gstlal_ll_inspiral_event_uploader @@ -157,7 +157,7 @@ class EventUploader(events.EventProcessor): self.upload_topic = f'gstlal.{self.tag}.{topic_prefix}uploads' ### heartbeat settings - self.last_heartbeat = 0.0 + self.last_inspiral_heartbeat = 0.0 self.heartbeat_write = inspiral.now() ### set up aggregator sink @@ -175,8 +175,8 @@ class EventUploader(events.EventProcessor): ### process heartbeat messages from inspiral jobs if message.key() and 'heartbeat' == message.key().decode('UTF-8'): heartbeat = json.loads(message.value()) - if heartbeat['time'] > self.last_heartbeat: - self.last_heartbeat = heartbeat['time'] + if heartbeat['time'] > self.last_inspiral_heartbeat: + self.last_inspiral_heartbeat = heartbeat['time'] ### process candidate event else: @@ -309,7 +309,7 @@ class EventUploader(events.EventProcessor): # jobs should send heartbeats every 10 minutes now = inspiral.now() if now - self.heartbeat_write > 15*60: - state = 0 if now - self.last_heartbeat > 15*60 else 1 + state = 0 if now - self.last_inspiral_heartbeat > 15*60 else 1 data = {'heartbeat': {'heartbeat_tag': {'time': [int(now)], 'fields': {'data': [state]}}}} logging.debug(f'Storing heartbeat state {state} to influx...') -- GitLab