__init__.py 738 Bytes
Newer Older
1
from __future__ import absolute_import, division, print_function
2

3 4 5
from apscheduler.executors.pool import ThreadPoolExecutor
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
from apscheduler.schedulers.background import BackgroundScheduler
6
from pytz import utc
7 8 9

from satnogsclient import settings

10
JOBSTORES = {'default': SQLAlchemyJobStore(url=settings.SATNOGS_SQLITE_URL)}
11

12
EXECUTORS = {
13 14 15
    'default': ThreadPoolExecutor(20),
}

16
JOB_DEFAULTS = {'coalesce': True, 'max_instances': 1, 'misfire_grace_time': 30}
17

18 19 20 21
SCHEDULER = BackgroundScheduler(jobstores=JOBSTORES,
                                executors=EXECUTORS,
                                job_defaults=JOB_DEFAULTS,
                                timezone=utc)