fix invalid scheduling
All checks were successful
Build container / Build (push) Successful in 38s

This commit is contained in:
2025-07-30 12:41:37 +02:00
parent 5e514bcc20
commit 840fd90b75

View File

@@ -49,14 +49,11 @@ class SendLeaderboard():
else:
# set the message sending time; include UTC shift +2
sending_time = time(hour=12, minute=0, second=0, tzinfo=timezone(timedelta(hours=2)))
job_queue.run_daily(self.callback_leaderboard, when=sending_time, day=-1)
job_queue.run_daily(self.callback_leaderboard, time=sending_time, days=(0))
async def callback_leaderboard(self, context):
"""Send a weakly leaderboard to the chat."""
if date.today().weekday() != 1:
self.logger.info("Today is not Monday, skipping leaderboard.")
return
# get the top contributions of the past week, month and year:
ranking_week = get_author_ranking(7)