Skip to content

Commit

Permalink
fix: change directory for temp files
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekzyla committed Jul 25, 2023
1 parent bf42b08 commit a6a9f99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions backend/SC4SNMP_UI_backend/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
CELERY_BROKER_URL = os.getenv("CELERY_BROKER_URL", "amqp://guest:guest@localhost:5672//")
REDIS_URL = os.getenv("REDIS_URL")
VALUES_DIRECTORY = os.getenv("VALUES_DIRECTORY", "")
KEEP_TEMP_FILES = os.getenv("KEEP_TEMP_FILES", "false")

class NoValuesDirectoryException(Exception):
pass
Expand Down
2 changes: 1 addition & 1 deletion backend/SC4SNMP_UI_backend/apply_changes/handling_chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def handle(self, request: dict):

for key, value in request["yaml_sections"].items():
tmp_file_name = TMP_FILE_PREFIX + key.replace(".", "_") + ".yaml"
directory = VALUES_DIRECTORY if not values_file_resolved else TMP_DIR
directory = VALUES_DIRECTORY if not delete_temp_files else TMP_DIR
tmp_file_path = os.path.join(directory, tmp_file_name)

mongo_collection = value[0]
Expand Down

0 comments on commit a6a9f99

Please sign in to comment.