This commit is contained in:
		| @@ -49,14 +49,11 @@ class SendLeaderboard(): | |||||||
|         else: |         else: | ||||||
|             # set the message sending time; include UTC shift +2 |             # set the message sending time; include UTC shift +2 | ||||||
|             sending_time = time(hour=12, minute=0, second=0, tzinfo=timezone(timedelta(hours=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): |     async def callback_leaderboard(self, context): | ||||||
|         """Send a weakly leaderboard to the chat.""" |         """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: |         # get the top contributions of the past week, month and year: | ||||||
|         ranking_week = get_author_ranking(7) |         ranking_week = get_author_ranking(7) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user