Update "no longer exists" response to not say the outage is resolved.
This commit is contained in:
parent
6a728e9668
commit
b98a39629c
1 changed files with 4 additions and 2 deletions
6
scl.py
6
scl.py
|
@ -382,7 +382,9 @@ with Session(engine) as session:
|
||||||
)
|
)
|
||||||
existing_record.most_recent_post_id = post_result["id"]
|
existing_record.most_recent_post_id = post_result["id"]
|
||||||
except mastodon.MastodonNotFoundError:
|
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"]:
|
elif max_event_class["is_postable"]:
|
||||||
print(
|
print(
|
||||||
"Posting an event that grew above the threshold required to post"
|
"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:
|
if active_outage.most_recent_post_id:
|
||||||
try:
|
try:
|
||||||
post_result = mastodon_client.status_post(
|
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,
|
in_reply_to_id=active_outage.most_recent_post_id,
|
||||||
visibility="public",
|
visibility="public",
|
||||||
language="en",
|
language="en",
|
||||||
|
|
Loading…
Reference in a new issue