[Twisted-Python] Twisted + Xapian WriteableDatabase leaves db_lock file on exit.

Twisted Sumo 2006-02-12 xapian and xapian bindings 0.9.2 svn 6532 I have written a Twisted service to write to a xapian database. I am using WriteableDatabase using DB_CREATE_OR_OPEN. I am also using twistd and the application plumbing to start the server. I have tried everything but no matter how I stop the server I can't get it to shutdown xapian cleanly. I have implemented stopService() on my service and do a .flush() and have even tried setting the db instance to None and tried using del self.db as well. I even added a reactor.addSystemEventTrigger() and tried "before", "during" and "after" "shutdown" and nothing seems to work. I stop the service with CTRL-C, kill -TERM `cat twistd.pid' and just plain kill 'cat twistd.pid' It leaves the db_lock file everytime and I don't know what else it might not be cleaning up correctly either. Has anyone gotten a WritableDatabase to work with Twisted? If so, how do I stop Twisted so it will shutdown xapian cleanly?
participants (1)
-
jarrod roberson