diff options
author | Benjamin Saller <bcsaller@objectrealms.net> | 2007-06-05 22:04:21 (GMT) |
---|---|---|
committer | Benjamin Saller <bcsaller@objectrealms.net> | 2007-06-05 22:04:21 (GMT) |
commit | 2ab777a7fa85f464066f841c262d4d4dc6d24564 (patch) | |
tree | 3398c4c146113f49866679b579f31e97699d55bf /bin | |
parent | 75c4b084944b857d18e5b3887b256ec96eab3e14 (diff) |
no ore.main in dist
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/index-service | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/bin/index-service b/bin/index-service index acc582c..490157a 100755 --- a/bin/index-service +++ b/bin/index-service @@ -16,7 +16,6 @@ from olpc.datastore.datastore import DS_DBUS_INTERFACE from olpc.datastore.indexer import Indexer import dbus import dbus.mainloop.glib -import gobject import logging import sys import os @@ -81,6 +80,7 @@ class IndexService(Application): # because the file isn't encoded anywhere accessible in the # create call we must actually get the filename and trigger # the indexing on that + import pdb;pdb.set_trace() filename = self.ds.get_filename(uid) r = None if filename: @@ -137,22 +137,22 @@ if __name__ == "__main__": signal.signal(signal.SIGTERM, handle_shutdown) idx = IndexService() - idx() +## idx() # w/o ore.main -## idx.eventloop = gobject.MainLoop() -## class options(object): pass -## o = options() -## o.fulltext_dir = 'fulltext' -## idx.options = o -## try: -## idx.main() -## except: -## # force logging this one -## logger.setLevel(logging.DEBUG) -## logger.debug("Problem in index service", -## exc_info=sys.exc_info()) -## idx.stopped() + idx.eventloop = gobject.MainLoop() + class options(object): pass + o = options() + o.fulltext_dir = 'fulltext' + idx.options = o + try: + idx.main() + except: + # force logging this one + logger.setLevel(logging.DEBUG) + logger.debug("Problem in index service", + exc_info=sys.exc_info()) + idx.stopped() |