*** rajesh has joined #zodb | 00:37 | |
*** J1m_ has quit IRC | 00:39 | |
*** rajesh has quit IRC | 00:39 | |
*** rajesh has joined #zodb | 00:39 | |
*** fdrake has quit IRC | 01:42 | |
*** JaRoel|4d has quit IRC | 03:26 | |
*** JaRoel|4d has joined #zodb | 14:12 | |
*** rajesh has joined #zodb | 16:20 | |
*** rajesh has quit IRC | 17:06 | |
*** LjL has joined #zodb | 20:12 | |
LjL | hi. 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 IRC | 20:40 | |
srichter | LjL: soemwhere should be a module global referencing the DB global, otherwise garbage collection would pick it up and close the DB | 21:01 |
srichter | LjL: it is just a matter of finding that global :-) | 21:02 |
LjL | srichter: 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 there | 21:03 |
LjL | right now, i've "solved" it by having a separate module that *only* interacts with the DB and does nothing else - i guess that works | 21:03 |
srichter | right | 21:03 |
srichter | so before you reload you basically have to close the DB | 21:04 |
srichter | your solution works too | 21:04 |
srichter | that is (I think) the approach we took with the reload support in Zoep 2 and 3 | 21:05 |
srichter | i.e. we were really selective what we reloaded isntead of reloading everything | 21:05 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!