Update "no longer exists" response to not say the outage is resolved.
All checks were successful
ci/woodpecker/manual/lint Pipeline was successful
ci/woodpecker/manual/vulnerability-scan Pipeline was successful

This commit is contained in:
Liam Steckler 2024-10-27 08:18:42 -07:00
parent 6a728e9668
commit b98a39629c

6
scl.py
View file

@ -382,7 +382,9 @@ with Session(engine) as session:
)
existing_record.most_recent_post_id = post_result["id"]
except mastodon.MastodonNotFoundError:
print("Could not post a reply to the existing post, skip this update")
print(
"Could not post a reply to the existing post, skip this update"
)
elif max_event_class["is_postable"]:
print(
"Posting an event that grew above the threshold required to post"
@ -451,7 +453,7 @@ with Session(engine) as session:
if active_outage.most_recent_post_id:
try:
post_result = mastodon_client.status_post(
status="This outage is reported to be resolved.\n\n#SeattleCityLightOutage #SCLOutage",
status="This outage is no longer in the SCL feed, which usually means it's either been resolved, or split into multiple smaller outages.\n\n#SeattleCityLightOutage #SCLOutage",
in_reply_to_id=active_outage.most_recent_post_id,
visibility="public",
language="en",