# HG changeset patch # User Sylvain Thénault # Date 1276617628 -7200 # Node ID b4393b681f7a3fb8f6df48cb290ce3c813835740 # Parent 487ab6ac90cc932b1f521e17f547c005538b15a6 [repo] on repository shutdown, we've to close the new eid creation connection diff -r 487ab6ac90cc -r b4393b681f7a server/repository.py --- 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) diff -r 487ab6ac90cc -r b4393b681f7a server/sources/native.py --- 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)