Fix confdir passing to workers

This commit is contained in:
Leo Vasanko 2023-11-21 12:52:42 +00:00
parent d2ad269df8
commit a267a67947

View File

@ -34,7 +34,7 @@ class Link(msgspec.Struct, omit_defaults=True):
config = None
conffile = os.environ.get("CISTA_HOME") or Path.home() / ".local/share/cista/db.toml"
conffile = None
def derived_secret(*params, len=8) -> bytes:
@ -120,7 +120,10 @@ def modifies_config(modify):
def load_config():
global config
global config, conffile
conffile = (
Path(os.environ.get("CISTA_HOME")) or Path.home() / ".local/share/cista/db.toml"
)
config = msgspec.toml.decode(conffile.read_bytes(), type=Config, dec_hook=dec_hook)