From 6202f0c2ab99c24405b65b1df8d3a8c00d3fb05d Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 6 Dec 2023 15:24:01 +0300 Subject: [PATCH 1/3] set ten seconds interval for testing --- src/bot/plugins/week_routine.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/bot/plugins/week_routine.py b/src/bot/plugins/week_routine.py index a1c4c64..f2f77d2 100644 --- a/src/bot/plugins/week_routine.py +++ b/src/bot/plugins/week_routine.py @@ -69,22 +69,20 @@ def on_start( scheduler.add_job( notify_service.notify_all_users, - "cron", - day_of_week=DAY_OF_WEEK_FRIDAY, - hour=FRIDAY_TIME_SENDING_MESSAGE, + "interval", + seconds=10, kwargs=dict(plugin=self, attachments=attachments, title="Еженедельный пятничный опрос"), ) scheduler.add_job( matching_service.run_matching, - "cron", - day_of_week=DAY_OF_WEEK_SUNDAY, + "interval", + seconds=10, hour=SUNDAY_TIME_SENDING_MESSAGE, ) scheduler.add_job( notify_service.meeting_notifications, - "cron", - day_of_week=DAY_OF_WEEK_MONDAY, - hour=MONDAY_TIME_SENDING_MESSAGE, + "interval", + seconds=10, kwargs=dict(plugin=self), ) scheduler.start() From e35ad16ce1ec33a94b171694c9a86fd1afdf30f8 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 6 Dec 2023 15:37:52 +0300 Subject: [PATCH 2/3] set ten seconds interval for testing --- src/bot/plugins/week_routine.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bot/plugins/week_routine.py b/src/bot/plugins/week_routine.py index 4e7967a..fce4a70 100644 --- a/src/bot/plugins/week_routine.py +++ b/src/bot/plugins/week_routine.py @@ -82,7 +82,6 @@ def on_start( matching_service.run_matching, "interval", seconds=10, - hour=SUNDAY_TIME_SENDING_MESSAGE, ) scheduler.add_job( notify_service.meeting_notifications, @@ -92,9 +91,8 @@ def on_start( ) scheduler.add_job( notify_service.match_review_notifications, - "cron", - day_of_week=DAY_OF_WEEK_WEDNESDAY, - hour=WEDNESDAY_TIME_SENDING_MESSAGE, + "interval", + seconds=10, kwargs=dict(plugin=self, attachments=wednesday_attachments), ) scheduler.start() From eedd38a47b166f8bcd5b2acc30589f14e1c94c32 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 6 Dec 2023 17:54:46 +0300 Subject: [PATCH 3/3] set timing to 1 minute --- src/bot/plugins/week_routine.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bot/plugins/week_routine.py b/src/bot/plugins/week_routine.py index fce4a70..fb87355 100644 --- a/src/bot/plugins/week_routine.py +++ b/src/bot/plugins/week_routine.py @@ -75,24 +75,24 @@ def on_start( scheduler.add_job( notify_service.notify_all_users, "interval", - seconds=10, + minutes=1, kwargs=dict(plugin=self, attachments=friday_attachments, title="Еженедельный пятничный опрос"), ) scheduler.add_job( matching_service.run_matching, "interval", - seconds=10, + minutes=1, ) scheduler.add_job( notify_service.meeting_notifications, "interval", - seconds=10, + minutes=1, kwargs=dict(plugin=self), ) scheduler.add_job( notify_service.match_review_notifications, "interval", - seconds=10, + minutes=1, kwargs=dict(plugin=self, attachments=wednesday_attachments), ) scheduler.start()