Don't post small outages

This commit is contained in:
Liam Steckler 2024-01-13 22:39:20 -08:00
parent 53a5cc8aa0
commit 54ab23a0e4

6
scl.py
View file

@ -176,7 +176,11 @@ with Session(engine) as session:
session.commit() session.commit()
except NoResultFound: except NoResultFound:
# TODO: Logic to post initial to Mastodon, if outage_size == "Small":
# If the outage becomes medium/large, it'll then be posted as a new outage on the next run
print("Outage is small, will not post")
continue
print("Existing record not found") print("Existing record not found")
post_text = """Seattle City Light is reporting a {} outage in {}. post_text = """Seattle City Light is reporting a {} outage in {}.