From be0665ac7cb02c0798c9a774d5bbbaa702fc2832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sondre=20Gr=C3=B8n=C3=A5s?= <44143748+sondregronas@users.noreply.github.com> Date: Sun, 14 Jul 2024 16:29:52 +0200 Subject: [PATCH] Update routine_tasks.py --- BookingSystem/routine_tasks.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/BookingSystem/routine_tasks.py b/BookingSystem/routine_tasks.py index cfbc313..98ec0e1 100644 --- a/BookingSystem/routine_tasks.py +++ b/BookingSystem/routine_tasks.py @@ -12,8 +12,6 @@ from teams import send_report from user import prune_inactive -from functools import partial - def run_continuously(interval=1): cease_continuous_run = threading.Event() @@ -54,8 +52,8 @@ def run_mon_to_fri_at_time(job_func, at_time): schedule.every().thursday.at(at_time).do(job_func) schedule.every().friday.at(at_time).do(job_func) - _send_report = partial(_task(send_report)) - _prune_inactive = partial(_task(prune_inactive)) + _send_report = lambda: _task(send_report) + _prune_inactive = lambda: _task(prune_inactive) # TODO: Add a setting to change the time of the day these run run_mon_to_fri_at_time(_send_report, "10:00")