Use process executor

This commit is contained in:
Jake Howard 2019-08-30 20:20:40 +01:00
parent c4dde7f7da
commit 2d3499dfd9
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

@ -1,6 +1,6 @@
import asyncio import asyncio
from apscheduler.schedulers.asyncio import AsyncIOScheduler from apscheduler.executors.pool import ProcessPoolExecutor
from apscheduler.schedulers.blocking import BlockingScheduler from apscheduler.schedulers.blocking import BlockingScheduler
from apscheduler.triggers.interval import IntervalTrigger from apscheduler.triggers.interval import IntervalTrigger
@ -9,7 +9,7 @@ from .todoist_repo_prs import todoist_repo_prs
def create_scheduler(): def create_scheduler():
scheduler = BlockingScheduler() scheduler = BlockingScheduler(executors={"default": ProcessPoolExecutor()})
scheduler.add_job(todoist_assigned_issues, "interval", minutes=15) scheduler.add_job(todoist_assigned_issues, "interval", minutes=15)
scheduler.add_job(todoist_repo_prs, "interval", minutes=15) scheduler.add_job(todoist_repo_prs, "interval", minutes=15)