Skip to content

Commit

Permalink
change the directory
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiPetukhov committed Dec 4, 2024
1 parent edeb489 commit 62ccf1e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions agent/worker/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ def task_clear_apps_data(self):
self.logger.info(
"Background task finished: Agent data has been cleared successfully"
)
tmp_dir = constants.SUPERVISELY_AGENT_FILES_CONTAINER() + "_to_remove"
tmp_dir = constants.SUPERVISELY_SYNCED_APP_DATA_CONTAINER() + "_to_remove"
if os.path.exists(tmp_dir):
self.logger.info(
"Start background task: Clearing apps data [_to_remove directory detected]"
Expand All @@ -770,8 +770,8 @@ def task_clear_apps_data(self):
elif constants.SHOULD_CLEAN_APPS_DATA():
self.logger.info("Start background task: Clearing apps data")
try:
shutil.move(constants.SUPERVISELY_AGENT_FILES_CONTAINER(), tmp_dir)
os.makedirs(constants.SUPERVISELY_AGENT_FILES_CONTAINER())
shutil.move(constants.SUPERVISELY_SYNCED_APP_DATA_CONTAINER(), tmp_dir)
os.makedirs(constants.SUPERVISELY_SYNCED_APP_DATA_CONTAINER())
shutil.rmtree(tmp_dir)
except:
self.logger.warn("Background task error: Failed to clear apps data", exc_info=True)
Expand Down

0 comments on commit 62ccf1e

Please sign in to comment.