Skip to content

Commit

Permalink
adding v1.2 cofnig to API broadcast
Browse files Browse the repository at this point in the history
  • Loading branch information
cityofcapetown-opm-bot committed Dec 18, 2024
1 parent 2ceaafe commit 58eb209
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cct_connector/ServiceAlertBroadcaster.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def generate_filename(self):
f"coct-service_alerts-{time_str}-{planned_str}.json" if self.version == "v0" else
f"v1/coct-service_alerts-{time_str}-{planned_str}.json" if self.version == "v1" else
f"v1.1/service-alerts/{time_str}/{planned_str}" if self.version == "v1.1" else
f"v1.2/service-alerts/{time_str}/{planned_str}" if self.version == "v1.2" else
None
)

Expand All @@ -45,14 +46,16 @@ def generate_filename(self):
"planned", "request_number", ]
V1_COLS = V0_COLS + [TWEET_COL, TOOT_COL]
V1_1_COLS = V1_COLS + ["area_type", GEOSPATIAL_COL]
V1_2_COLS = V1_1_COLS + ["status"]

BOK_CONFIGS = [
ServiceAlertOutputFileConfig(time_window, planned, version, version_cols)
for time_window in [None, 7, "current"]
for planned in [True, False]
for version, version_cols in (('v0', V0_COLS),
('v1', V1_COLS),
('v1.1', V1_1_COLS))
('v1.1', V1_1_COLS),
('v1.2', V1_2_COLS),)
]

EXPIRY_COL = 'expiry_date'
Expand Down

0 comments on commit 58eb209

Please sign in to comment.