-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.py
22 lines (18 loc) · 855 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import os
from dotenv import load_dotenv
# from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
# from apscheduler.executors.pool import ThreadPoolExecutor
basedir = os.path.abspath(os.path.dirname(__file__))
load_dotenv(os.path.join(basedir, '.env'))
class Config:
SECRET_KEY = os.environ.get('SECRET_KEY') or 'my-not-so-secret-key'
SQLALCHEMY_DATABASE_URI = os.environ.get(
'DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'app.db')
INTERVAL_TASK_ID = os.environ.get('INTERVAL_TASK_ID') or 'interval-task-id'
SCHEDULER_API_ENABLED = os.environ.get('SCHEDULER_API_ENABLED') or True
# SCHEDULER_JOBSTORES = {
# 'default': SQLAlchemyJobStore(url='sqlite:///flask_context.db') # will persist jobs across reboots
# }
# SCHEDULER_EXECUTORS = {
# 'default': ThreadPoolExecutor(1)
# }