T-580 精简设置页更新执行配置
This commit is contained in:
+4
-4
@@ -1509,15 +1509,15 @@ def apply_task(account, task, close_success_tab=False, on_step=None, bring_to_fr
|
||||
_notify_apply_step(on_step, current_step, "failed", str(exc))
|
||||
return {"committed": False, "error": str(exc)}
|
||||
finally:
|
||||
_close_applied_product(cdp, committed=committed, close_success_tab=close_success_tab)
|
||||
_close_applied_product(cdp, committed=committed)
|
||||
|
||||
|
||||
def _close_applied_product(cdp, committed=False, close_success_tab=False):
|
||||
def _close_applied_product(cdp, committed=False):
|
||||
target_id = getattr(cdp, "target_id", None)
|
||||
created_by_app = bool(getattr(cdp, "created_by_app", False))
|
||||
host = getattr(cdp, "cdp_host", None)
|
||||
should_close_tab = bool(created_by_app and target_id and (not committed or close_success_tab))
|
||||
should_wait_before_close = bool(committed and close_success_tab)
|
||||
should_close_tab = bool(created_by_app and target_id)
|
||||
should_wait_before_close = bool(committed)
|
||||
try:
|
||||
cdp.close()
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user