Browse Source

feat: 修改重复的删除目录的逻辑

pull/13010/head
Aaron3S 7 months ago committed by Bryan
parent
commit
2ac87e4ad6
  1. 2
      apps/assets/automations/base/manager.py
  2. 2
      apps/jumpserver/settings/base.py
  3. 2
      apps/terminal/automations/deploy_applet_host/__init__.py

2
apps/assets/automations/base/manager.py

@ -314,7 +314,7 @@ class BasePlaybookManager:
def delete_runtime_dir(self):
if settings.DEBUG_DEV:
return
shutil.rmtree(self.runtime_dir)
shutil.rmtree(self.runtime_dir, ignore_errors=True)
def run(self, *args, **kwargs):
print(">>> 任务准备阶段\n")

2
apps/jumpserver/settings/base.py

@ -39,7 +39,7 @@ PROJECT_DIR = const.PROJECT_DIR
APPS_DIR = os.path.join(PROJECT_DIR, 'apps')
DATA_DIR = os.path.join(PROJECT_DIR, 'data')
SHARE_DIR = os.path.join(DATA_DIR, 'share')
ANSIBLE_DIR = os.path.join(DATA_DIR, 'ansible')
ANSIBLE_DIR = os.path.join(SHARE_DIR, 'ansible')
CERTS_DIR = os.path.join(DATA_DIR, 'certs')
# Quick-start development settings - unsuitable for production

2
apps/terminal/automations/deploy_applet_host/__init__.py

@ -145,7 +145,7 @@ class DeployAppletHostManager:
def delete_runtime_dir(self):
if settings.DEBUG_DEV:
return
shutil.rmtree(self.run_dir)
shutil.rmtree(self.run_dir, ignore_errors=True)
def _run(self, cb_func: callable, **kwargs):
try:

Loading…
Cancel
Save