durusmail: durus-users: Closing storage engines.
Closing storage engines.
2007-03-19
2007-03-19
2007-03-19
Closing storage engines.
David Binger
2007-03-19
On Mar 19, 2007, at 4:49 AM, Peter Wilkinson wrote:

> Hi,
> I've run across what looks like an omission to me in
> storage_server.py. Currently handle_Q doesn't call close on the
> storage engine and so if it needs to clean up any resources (in my
> case a sqlite connection) it doesn't get a chance. I think the
> method should have that additional call added and look like:
>
>     def handle_Q(self, s):
>         # graceful quit
>         log(20, 'Close storage')
>         self.storage.close()
>         log(20, 'Quit')
>         raise SystemExit
>
> Are there any issues that I may not have thought of with adding that?

It looks like a good change to me.

I'm curious about this sqlite connection.

reply