From ca3f92c0b672a27687451f9909e5c59962bf0d51 Mon Sep 17 00:00:00 2001 From: Mike Lang Date: Mon, 2 Oct 2023 19:13:23 +1100 Subject: [PATCH] sheetsync: Use streamlog section instead of deriving day from start time --- sheetsync/sheetsync/streamlog.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sheetsync/sheetsync/streamlog.py b/sheetsync/sheetsync/streamlog.py index a4717ca..7882485 100644 --- a/sheetsync/sheetsync/streamlog.py +++ b/sheetsync/sheetsync/streamlog.py @@ -38,9 +38,8 @@ class StreamLogClient(): class StreamLogMiddleware: - def __init__(self, client, bustime_start): + def __init__(self, client): self.client = client - self.bustime_start = bustime_start # Maps DB column names to streamlog fields. self.column_map = { 'event_start': 'start_time', @@ -90,10 +89,9 @@ class StreamLogMiddleware: output[column] = value # Implicit tags - day = dt_to_bustime(self.bustime_start, output['event_start']) // 86400 output['tags'] += [ output['category'], - "Day %d" % (day + 1) if day >= 0 else "Tech Test & Preshow", + row['section']['name'], ] if output["poster_moment"]: output['tags'] += 'Poster Moment'