Optimize audit process

In the current audit process, after executing the strategy,
will check whether there are currently running actionplan,
and if so, will set the new actionplan SUPERSEDED.
We can optimize the process to perform this check in pre_execute(),
and if any actionplan is running, no further processing is performed.

Change-Id: I7377b53a2374b1dc177d256a0f800a86b1a2a16b
Closes-Bug: #1663150
This commit is contained in:
licanwei
2017-02-09 18:06:51 +08:00
parent 8ceb710b59
commit fceab5299b
3 changed files with 18 additions and 22 deletions

View File

@@ -267,9 +267,7 @@ class ActionPlanReferenced(Invalid):
class ActionPlanIsOngoing(Conflict):
msg_fmt = _("Action Plan %(action_plan)s is currently running. "
"New Action Plan %(new_action_plan)s will be set as "
"SUPERSEDED")
msg_fmt = _("Action Plan %(action_plan)s is currently running.")
class ActionNotFound(ResourceNotFound):