Repository.close() not called / cleanup mechanism
|Reported by:||Owned by:||Christian Boos|
It seems to me that
Repository.close() is never called, especially not by the main users of the vc layer, i.e.
In my vc backend I'd have to do some cleanup (closing a database connection) when the repository handle is not needed anymore. The
close() method looks like the right place for doing such cleanups (in contrast to
__del__() finalizers, which are highly unreliable).
Note that such cleanups have to be done always when trac ends, regardless of the serving method used! (For example, during development, I use tracd, and regularly kill it using a ctrl-c).
Thinking of it, trac could even have a shutdown extension point to be implemented by all plugins that need to do something when trac terminates. (Maybe it would be worth filing an enhancement ticket for that…)