-
Notifications
You must be signed in to change notification settings - Fork 0
/
vars.py
34 lines (23 loc) · 808 Bytes
/
vars.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
import os
import sys
import logging as log
def get_base() -> str:
current_dir = os.path.dirname(os.path.abspath(__file__))
if PROJECT_NAME not in current_dir:
log.critical(f'Please ensure that scripts is running with project-name "{PROJECT_NAME}" in path.')
sys.exit(0)
while not current_dir.endswith(PROJECT_NAME):
current_dir = os.path.dirname(current_dir)
else:
base = current_dir
return base
PROJECT_NAME = 'dwdm.tg_bot'
BASE = get_base()
DATA_DIR = 'data'
CREDITS_FILENAME = 'credentials.json'
GOOGLE_API_FILENAME = 'api-project.json'
PATTERNS_FILENAME = 'patterns.json'
NECESSARY_FILES = [CREDITS_FILENAME, GOOGLE_API_FILENAME, PATTERNS_FILENAME]
LOG_LEVEL = 'WARN'
BOT_NAME = '@GBL_DWDM_Monitoring_Bot'
BOT_DFT_CHAT = '[GBL-DWDM] Alerts'