add config to disable daily summary

This commit is contained in:
transcental 2025-09-29 00:46:29 +01:00
parent 22c859915a
commit cb7f7908c0
No known key found for this signature in database
GPG key ID: 81E4B6CCB9561611
2 changed files with 3 additions and 1 deletions

View file

@ -36,7 +36,8 @@ async def main(_app: Starlette):
await env.db.connect()
scheduler = AsyncIOScheduler(timezone="Europe/London")
scheduler.add_job(send_daily_stats, "cron", hour=0, minute=0)
if env.daily_summary:
scheduler.add_job(send_daily_stats, "cron", hour=0, minute=0)
scheduler.add_job(
close_stale_tickets,
"interval",

View file

@ -29,6 +29,7 @@ class Environment:
self.slack_user_group = os.environ.get("SLACK_USER_GROUP", "unset")
self.slack_maintainer_id = os.environ.get("SLACK_MAINTAINER_ID", "unset")
self.program = os.environ.get("PROGRAM", "summer_of_making")
self.daily_summary = True if not os.environ.get("DAILY_SUMMARY") else False
self.port = int(os.environ.get("PORT", 3000))