diff --git a/db.py b/db.py index 0d3ffa88..2829336d 100644 --- a/db.py +++ b/db.py @@ -953,11 +953,12 @@ class Halloween(Base): session = Session() halloweens = session.query(Halloween).all() session.close() - started = bool(halloweens) completed = [False for _ in range(7)] + started = False for h in halloweens: for i in range(7): if h[i+1]: + started = True completed[i] = True return started, completed diff --git a/statsupdate.py b/statsupdate.py index be2ff4bc..5d5749cc 100644 --- a/statsupdate.py +++ b/statsupdate.py @@ -63,6 +63,10 @@ def new_lol_rank(item: db.LeagueOfLegends): logger.warning(f"Couldn't notify on Telegram: {item}") +def halloween_checks(item: db.Halloween, session: db.Session): + # Dota last matches + session.query(db.Dota).join(db.Steam).filter_by(id=item.royal).one_or_none() + def process(): while True: logger.info("Pausing for 30 minutes.")