Close session after updating lease statuses

If the session is left open, later migration scripts may hang when
trying to access the same tables.

Change-Id: I8745c38f44b6b9eefaa5dfd30815cd57a3c668e9
This commit is contained in:
Pierre Riteau 2018-07-27 15:23:57 +01:00
parent 66b1af9058
commit 0429ac8210
1 changed files with 2 additions and 0 deletions

View File

@ -101,6 +101,8 @@ def upgrade():
lease.update().values(status='ERROR').
where(lease.c.id == l[0]))
sess.close()
def downgrade():
meta = _get_metadata()