IRC log of #zodb for Saturday, 2013-05-25

*** rajesh has joined #zodb00:37
*** J1m_ has quit IRC00:39
*** rajesh has quit IRC00:39
*** rajesh has joined #zodb00:39
*** fdrake has quit IRC01:42
*** JaRoel|4d has quit IRC03:26
*** JaRoel|4d has joined #zodb14:12
*** rajesh has joined #zodb16:20
*** rajesh has quit IRC17:06
*** LjL has joined #zodb20:12
LjLhi. is there a reasonable way to close a database / remove its lock file when i no longer have a reference to the filestorage, connection or anything, even though i'm no longer using it?20:20
*** JaRoel|4d has quit IRC20:40
srichterLjL: soemwhere should be a module global referencing the DB global, otherwise garbage collection would pick it up and close the DB21:01
srichterLjL: it is just a matter of finding that global :-)21:02
LjLsrichter: uhm... maybe i didn't wait long enough for the GC to kick in. here's the thing - i'm writing modules for an IRC bot (Phenny), this bot has a feature to "reload" a module (so i don't have to restart the entire bot every time i change some code), but when i reload a module, its globals are lost. it tries to connect to the DB again but it can't, because the lockfile is still there21:03
LjLright now, i've "solved" it by having a separate module that *only* interacts with the DB and does nothing else - i guess that works21:03
srichterright21:03
srichterso before you reload you basically have to close the DB21:04
srichteryour solution works too21:04
srichterthat is (I think) the approach we took with the reload support in Zoep 2 and 321:05
srichteri.e. we were really selective what we reloaded isntead of reloading everything21:05

Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!