Merge "Don't persist_state of IN_PROGRESS stack again"

This commit is contained in:
Jenkins 2016-07-26 05:43:08 +00:00 committed by Gerrit Code Review
commit 9f0c2651e8
1 changed files with 4 additions and 2 deletions

View File

@ -181,8 +181,10 @@ class ThreadGroupManager(object):
Persist the stack state to COMPLETE and FAILED close to
releasing the lock to avoid race conditions.
"""
if stack is not None and stack.action not in (
stack.DELETE, stack.ROLLBACK, stack.UPDATE):
if (stack is not None and stack.status != stack.IN_PROGRESS
and stack.action not in (stack.DELETE,
stack.ROLLBACK,
stack.UPDATE)):
stack.persist_state_and_release_lock(lock.engine_id)
else:
lock.release()