Skip to content

Instantly share code, notes, and snippets.

View mrkisaolamb's full-sized avatar

Kamil Sambor mrkisaolamb

View GitHub Profile
@mrkisaolamb
mrkisaolamb / scheduler.py
Last active March 18, 2017 11:44
scheduler.py
from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.jobstores.base import ConflictingIdError
scheduler = BackgroundScheduler({
'apscheduler.jobstores.default': {
'type': 'sqlalchemy',
'url': config.SQLALCHEMY_DATABASE_URI
},
'apscheduler.executors.default': {
'class': 'apscheduler.executors.pool:ThreadPoolExecutor',