From 312a006312019c84556dbbe64d91a097b7725dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=AE=D1=80=D0=B8=D0=B9=20=D0=A7=D0=B5=D1=80=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Thu, 23 Apr 2026 20:55:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B5=D1=89=D0=B5=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 1 + scheduler.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index 3624019..9a82c3f 100644 --- a/app.py +++ b/app.py @@ -129,6 +129,7 @@ def start_scheduler(): thread = threading.Thread( target=run_scheduler, + kwargs={"with_signal_handlers": False}, daemon=True ) thread.start() diff --git a/scheduler.py b/scheduler.py index 0005445..c944866 100644 --- a/scheduler.py +++ b/scheduler.py @@ -495,8 +495,9 @@ def install_signal_handlers() -> None: # СТАРТ # ========================================================= -def run_scheduler() -> None: - # install_signal_handlers() +def run_scheduler(with_signal_handlers: bool = False) -> None: + if with_signal_handlers: + install_signal_handlers() log("[scheduler] started") @@ -523,6 +524,5 @@ def run_scheduler() -> None: standings_thread.join(timeout=5) log("[scheduler] fully stopped") - if __name__ == "__main__": run_scheduler() \ No newline at end of file