-
Notifications
You must be signed in to change notification settings - Fork 202
/
default_settings.py
102 lines (84 loc) · 2.43 KB
/
default_settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
"""Default settings."""
import logging
import os
#
# Development mode or production mode
# If DEBUG is True, then auto-reload is enabled, i.e., when code is modified, server will be
# reloaded immediately
#
DEBUG = True
#
# Static Assets
#
# The web UI is a single page app. All javascripts/css files should be in STATIC_DIR_PATH
#
STATIC_DIR_PATH = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'static')
TEMPLATE_DIR_PATH = STATIC_DIR_PATH
APP_INDEX_PAGE = 'index.html'
#
# Server setup
#
HTTP_PORT = 7777
HTTP_ADDRESS = '127.0.0.1'
TORNADO_MAX_WORKERS = 8
#
# ApScheduler settings
#
THREAD_POOL_SIZE = 4
JOB_MAX_INSTANCES = 3
JOB_COALESCE = True
TIMEZONE = 'UTC'
# When a job is misfired -- A job were to run at a specific time, but due to some
# reason (e.g., scheduler restart), we miss that run.
#
# By default, if a job is misfired within 1 hour, the scheduler will rerun it.
# Otherwise, if it's misfired over 1 hour, the scheduler will not rerun it.
JOB_MISFIRE_GRACE_SEC = 3600
#
# Database settings
#
JOBS_TABLENAME = 'scheduler_jobs'
EXECUTIONS_TABLENAME = 'scheduler_execution'
AUDIT_LOGS_TABLENAME = 'scheduler_jobauditlog'
DATABASE_TABLENAMES = {
'jobs_tablename': JOBS_TABLENAME,
'executions_tablename': EXECUTIONS_TABLENAME,
'auditlogs_tablename': AUDIT_LOGS_TABLENAME
}
# See different database providers in ndscheduler/core/datastore/providers/
# SQLite
#
DATABASE_CLASS = 'ndscheduler.corescheduler.datastore.providers.sqlite.DatastoreSqlite'
DATABASE_CONFIG_DICT = {
'file_path': 'datastore.db'
}
# Postgres
#
# DATABASE_CLASS = 'ndscheduler.corescheduler.datastore.providers.postgres.DatastorePostgres'
# DATABASE_CONFIG_DICT = {
# 'user': 'username',
# 'password': '',
# 'hostname': 'localhost',
# 'port': 5432,
# 'database': 'scheduler',
# 'sslmode': 'disable'
# }
# MySQL
#
# DATABASE_CLASS = 'ndscheduler.corescheduler.datastore.providers.mysql.DatastoreMySQL'
# DATABASE_CONFIG_DICT = {
# 'user': 'username',
# 'password': '',
# 'hostname': 'localhost',
# 'port': 3306,
# 'database': 'scheduler'
# }
# ndschedule is based on apscheduler. Here we can customize the apscheduler's main scheduler class
# Please see ndscheduler/core/scheduler/base.py
SCHEDULER_CLASS = 'ndscheduler.corescheduler.core.base.BaseScheduler'
#
# Set logging level
#
logging.getLogger().setLevel(logging.INFO)
# Packages that contains job classes, e.g., simple_scheduler.jobs
JOB_CLASS_PACKAGES = []