-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.py
More file actions
37 lines (28 loc) · 798 Bytes
/
config.py
File metadata and controls
37 lines (28 loc) · 798 Bytes
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
"""
Configures the Consistency checks app
"""
from enum import Enum
class DBEngine(Enum):
MYSQL = 1
POSTGRES = 2
def db_engine() -> DBEngine:
"""
Configures the DB engine to use for the consistency checks
"""
return DBEngine.MYSQL
def db_config() -> dict:
return {
'user': 'foo',
'password': 'bar',
'database': 'mydb',
'host': '127.0.0.1',
'port': 3306
}
def slack_token() -> str:
"""
When not None, then this slack webhook is notified of failed consistency checks.
Slack channel's token (i.e. EXAMPLE/SLACK/TOKEN) can be retrieved from the
channel's app "Incoming WebHooks" configuration as part of the Webhook URL.
Idea taken from Mara framework: https://github.com/mara
"""
return None