You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ariatosca.apache.org by mx...@apache.org on 2017/05/01 10:12:47 UTC
incubator-ariatosca git commit: trying to fix the database is locked
issue
Repository: incubator-ariatosca
Updated Branches:
refs/heads/ARIA-163-Update-node-state-for-stub-tasks 8c8eb1581 -> f1060256c
trying to fix the database is locked issue
Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/f1060256
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f1060256
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f1060256
Branch: refs/heads/ARIA-163-Update-node-state-for-stub-tasks
Commit: f1060256cd67eb9666496dc3924742b2e3c215b2
Parents: 8c8eb15
Author: max-orlov <ma...@gigaspaces.com>
Authored: Mon May 1 13:12:42 2017 +0300
Committer: max-orlov <ma...@gigaspaces.com>
Committed: Mon May 1 13:12:42 2017 +0300
----------------------------------------------------------------------
aria/logger.py | 2 ++
aria/storage/sql_mapi.py | 2 ++
2 files changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f1060256/aria/logger.py
----------------------------------------------------------------------
diff --git a/aria/logger.py b/aria/logger.py
index 8e15f5b..97d3878 100644
--- a/aria/logger.py
+++ b/aria/logger.py
@@ -195,6 +195,8 @@ class _SQLAlchemyHandler(logging.Handler):
except BaseException:
self._session.rollback()
raise
+ finally:
+ self._session.close()
_default_file_formatter = logging.Formatter(
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f1060256/aria/storage/sql_mapi.py
----------------------------------------------------------------------
diff --git a/aria/storage/sql_mapi.py b/aria/storage/sql_mapi.py
index 730d007..ed12f0a 100644
--- a/aria/storage/sql_mapi.py
+++ b/aria/storage/sql_mapi.py
@@ -175,6 +175,8 @@ class SQLAlchemyModelAPI(api.ModelAPI):
except (SQLAlchemyError, ValueError) as e:
self._session.rollback()
raise exceptions.StorageError('SQL Storage error: {0}'.format(str(e)))
+ finally:
+ self._session.close()
def _get_base_query(self, include, joins):
"""Create the initial query from the model class and included columns