Blame view

config/old_config/config_base.py 1.19 KB
1192cc3d   Etienne Pallier   Nouveau système d...
1
2
3
4
# Inspired from https://whalesalad.com/blog/doing-python-configuration-right

import os

5fd14978   Etienne Pallier   Agent lit config ...
5
6
7
8
from logpyros import LogPyros



1192cc3d   Etienne Pallier   Nouveau système d...
9
10
11
12
13
14
15
16
APP_NAME = "PYROS"

# Conveniences to always have a quick reference to the
# top-level application directory.
ROOT_DIR = os.path.join(
    os.path.dirname(os.path.realpath(__file__)),
    os.pardir, # '..'
)
5fd14978   Etienne Pallier   Agent lit config ...
17
18
ROOT_DIR = os.path.normpath(ROOT_DIR)
#ROOT_DIR = os.path.realpath(ROOT_DIR)
1192cc3d   Etienne Pallier   Nouveau système d...
19
20

# root directories
a9d06e6f   Etienne Pallier   new PYROS_DOCKER_...
21
22
#CONFIG_DIR = os.path.join(ROOT_DIR, "config")
CONFIG_DIR = os.path.join(ROOT_DIR, "old_config")
1192cc3d   Etienne Pallier   Nouveau système d...
23
24
25
26
27
28
29
DOC_DIR = os.path.join(ROOT_DIR, "doc")
INSTALL_DIR = os.path.join(ROOT_DIR, "install")
LOG_DIR = os.path.join(ROOT_DIR, "config", "logs")
SOURCE_DIR = os.path.join(ROOT_DIR, "src")

# source sub-directories
CELME_DIR = os.path.join(SOURCE_DIR, "core", "celme")
5fd14978   Etienne Pallier   Agent lit config ...
30
#PYROS_DJANGO_BASE_DIR = Path("src/core/pyros_django") # pathlib
1192cc3d   Etienne Pallier   Nouveau système d...
31
32
33
PYROS_DJANGO_DIR = os.path.join(SOURCE_DIR, "core", "pyros_django")
DEVICES_DIR = os.path.join(SOURCE_DIR, "device_controller")

5fd14978   Etienne Pallier   Agent lit config ...
34
35
36
37
38
DEFAULT_CONFIG_FILE_NAME = "config_unit_simulunit1.xml"
#CONFIG_DIR_NAME = "config"

# Default LOG level is INFO
PYROS_DEFAULT_GLOBAL_LOG_LEVEL = LogPyros.LOG_LEVEL_INFO # INFO
1192cc3d   Etienne Pallier   Nouveau système d...
39

a9d06e6f   Etienne Pallier   new PYROS_DOCKER_...
40
SYSTEM_REBOOT_COMMAND = "sudo systemctl restart foo.service"