--- a/server/repository.py Tue Jun 15 18:00:26 2010 +0200
+++ b/server/repository.py Tue Jun 15 18:00:28 2010 +0200
@@ -325,6 +325,7 @@
"""
assert not self._shutting_down, 'already shutting down'
self._shutting_down = True
+ self.system_source.shutdown()
if isinstance(self._looping_tasks, tuple): # if tasks have been started
for looptask in self._looping_tasks:
self.info('canceling task %s...', looptask.name)
--- a/server/sources/native.py Tue Jun 15 18:00:26 2010 +0200
+++ b/server/sources/native.py Tue Jun 15 18:00:28 2010 +0200
@@ -335,6 +335,10 @@
def init(self):
self.init_creating()
+ def shutdown(self):
+ if self._eid_creation_cnx:
+ self._eid_creation_cnx.close()
+
# XXX deprecates [un]map_attribute ?
def map_attribute(self, etype, attr, cb, sourcedb=True):
self._rql_sqlgen.attr_map['%s.%s' % (etype, attr)] = (cb, sourcedb)