# HG changeset patch # User Marcin Kuzminski # Date 1283512027 -7200 # Node ID d726f62f886e07ce1067a8d423339082218dd910 # Parent c3236d7febadb2e6c56a6b835b203681bbdb6493 updated whoosh indexer to take index building argument type diff -r c3236d7febad -r d726f62f886e pylons_app/lib/indexers/daemon.py --- a/pylons_app/lib/indexers/daemon.py Fri Sep 03 09:55:48 2010 +0200 +++ b/pylons_app/lib/indexers/daemon.py Fri Sep 03 13:07:07 2010 +0200 @@ -184,8 +184,24 @@ self.update_index() if __name__ == "__main__": - repo_location = '/home/marcink/hg_repos/*' - full_index = True # False means looking just for changes + arg = sys.argv[1:] + if not arg: + sys.stdout.write('Please specify indexing type [full|incremental]' + ' as script arg \n') + sys.exit() + if arg[0] == 'full': + full_index = True + elif arg[0] == 'incremental': + # False means looking just for changes + full_index = False + else: + sys.stdout.write('Please use [full|incremental]' + ' as script arg \n') + sys.exit() + + + repo_location = '/home/hg_repos/*' + try: l = DaemonLock() WhooshIndexingDaemon(repo_location=repo_location)\