move the db stack delete into parser.py as it is non-blocking.

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
Angus Salkeld 2012-04-13 20:13:09 +10:00
parent 90a67a7363
commit 4d1b1394cf
2 changed files with 2 additions and 1 deletions

View File

@ -123,7 +123,6 @@ class EngineManager(manager.Manager):
rt = db_api.raw_template_get(None, st.raw_template_id)
ps = parser.Stack(st.name, rt.template, params)
db_api.stack_delete(None, stack_name)
ps.delete()
return None

View File

@ -168,6 +168,8 @@ class Stack(object):
except Exception as ex:
logger.error('delete: %s' % str(ex))
db_api.stack_delete(None, self.name)
def delete(self):
pool = eventlet.GreenPool()
pool.spawn_n(self.delete_blocking)