Skip to content

Commit

Permalink
Returns logging
Browse files Browse the repository at this point in the history
  • Loading branch information
CollectiveUnicorn committed Sep 19, 2024
1 parent 18f4d4c commit cac0fdb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/leapfrogai_api/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ def process(self, event):
return

filename = os.path.basename(event.src_path)
logger.debug(f"Processing event '{event.event_type}' for file '{filename}'")

# Check if the file matches the config filename or pattern
if fnmatch.fnmatch(filename, self.config.filename):
if event.event_type == "deleted":
logger.info(f"Detected deletion of config file '{filename}'")
self.config.remove_model_by_config(filename)
else:
logger.info(
f"Detected modification/creation of config file '{filename}'"
)
self.config.load_config_file(self.config.directory, filename)


Expand Down

0 comments on commit cac0fdb

Please sign in to comment.