Skip to content

Commit

Permalink
fix: fixed config monitoring on linux and macos
Browse files Browse the repository at this point in the history
  • Loading branch information
ShyAssassin committed Feb 13, 2024
1 parent e026c83 commit 879c9f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion TrackingBackend/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ def load(self) -> ConfigManager:
return self

def on_modified(self, event: FileModifiedEvent) -> None:
if event.src_path == CONFIG_FILE:
# macos is weird, sometimes returns the absolute path instead of relative
if event.src_path == CONFIG_FILE or event.src_path == os.path.abspath(CONFIG_FILE):
self.__logger.debug(f"Config modified event fired `{event.src_path}`")
# we cant deepcopy the whole class because threads contains multiple `AuthenticationString` objects
old_config = deepcopy(self.model_dump())
Expand Down

0 comments on commit 879c9f1

Please sign in to comment.