Update resource statuses in the database
This ensures that resources will not get deleted multiple times when something else fails during stack deletion. Signed-off-by: Zane Bitter <zbitter@redhat.com>
This commit is contained in:
parent
c63965b3a0
commit
5467f40da3
@ -119,6 +119,9 @@ class Resource(object):
|
||||
|
||||
except Exception as ex:
|
||||
logger.warn('db error %s' % str(ex))
|
||||
elif new_state is not self.CREATE_IN_PROGRESS:
|
||||
rs = db_api.resource_get(None, self.id)
|
||||
rs.update_and_save({'state': new_state})
|
||||
|
||||
if new_state != self.state:
|
||||
ev = {}
|
||||
|
Loading…
Reference in New Issue
Block a user