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

pull/13010/head
Aaron3S 8 months ago committed by Bryan
parent 3740a4ad6f
commit 2ac87e4ad6

@ -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")

@ -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

@ -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