Switch out to thread pool executor

Might fix weird issues around processes dying
This commit is contained in:
Jake Howard 2019-09-19 09:01:22 +01:00
parent 532d7309e3
commit 612cf66c09
Signed by: jake
GPG key ID: 57AFB45680EDD477

View file

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