Skip to content

Commit

Permalink
fix 6f6f704
Browse files Browse the repository at this point in the history
(cherry picked from commit ed6a838)
  • Loading branch information
Belissimo-T committed Sep 30, 2024
1 parent 4dbab54 commit 96413e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/load_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def __init__(self, school_number: str, plan_downloader: PlanDownloader, plan_pro
self.plan_downloader = plan_downloader
self.plan_processor = plan_processor
self._plan_compute_executor = concurrent.futures.ProcessPoolExecutor(max_workers=1)
self._plan_compute_awaiter_executor = concurrent.futures.ThreadPoolExecutor(max_workers=2)

async def check_infinite(self, interval: int = 60, *, once: bool = False, ignore_exceptions: bool = False):
try:
Expand Down Expand Up @@ -61,7 +62,7 @@ def _process_plans(t_start: datetime.datetime):
if updated_dates:
self.plan_processor._logger.debug("* Processing plans...")
self.plan_processor.meta_extractor.invalidate_cache()
self._plan_compute_executor.submit(_process_plans, t_start=_t1)
self._plan_compute_awaiter_executor.submit(_process_plans, t_start=_t1)
else:
self.plan_processor._logger.debug("* No plans to process.")
except Exception as e:
Expand Down

0 comments on commit 96413e4

Please sign in to comment.