forked from Hay1tsme/artemis
DIANA_CFG_DIR -> ARTEMIS_CFG_DIR
This commit is contained in:
parent
752d27b30a
commit
2d0c26c6ca
|
@ -841,7 +841,7 @@ class DLReport:
|
|||
|
||||
return True
|
||||
|
||||
cfg_dir = environ.get("DIANA_CFG_DIR", "config")
|
||||
cfg_dir = environ.get("ARTEMIS_CFG_DIR", "config")
|
||||
cfg: CoreConfig = CoreConfig()
|
||||
if path.exists(f"{cfg_dir}/core.yaml"):
|
||||
cfg.update(yaml.safe_load(open(f"{cfg_dir}/core.yaml")))
|
||||
|
|
|
@ -823,7 +823,7 @@ class FE_Machine(FE_Base):
|
|||
arcade={}
|
||||
), media_type="text/html; charset=utf-8")
|
||||
|
||||
cfg_dir = environ.get("DIANA_CFG_DIR", "config")
|
||||
cfg_dir = environ.get("ARTEMIS_CFG_DIR", "config")
|
||||
cfg: CoreConfig = CoreConfig()
|
||||
if path.exists(f"{cfg_dir}/core.yaml"):
|
||||
cfg.update(yaml.safe_load(open(f"{cfg_dir}/core.yaml")))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
from os import mkdir, path, access, W_OK
|
||||
import os
|
||||
from os import path
|
||||
import yaml
|
||||
import asyncio
|
||||
|
||||
|
@ -30,6 +31,8 @@ if __name__ == "__main__":
|
|||
cfg_dict = yaml.safe_load(open(f"{args.config}/core.yaml"))
|
||||
cfg_dict.get("database", {})["loglevel"] = "info"
|
||||
cfg.update(cfg_dict)
|
||||
|
||||
os.environ["ARTEMIS_CFG_DIR"] = args.config
|
||||
|
||||
core.logger.init_root_logger(cfg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue