Skip to content

Commit

Permalink
Update routine_tasks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sondregronas authored Jul 14, 2024
1 parent 4474977 commit be0665a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions BookingSystem/routine_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit be0665a

Please sign in to comment.