comparison roundup/admin.py @ 826:6d7a45c8464a

Added reindex command to roundup-admin. Fixed reindex on first access. Also fixed reindexing of entries that change.
author Richard Jones <richard@users.sourceforge.net>
date Tue, 09 Jul 2002 04:19:09 +0000
parents 6e6c63a57df9
children 68cef2bb929d
comparison
equal deleted inserted replaced
825:0779ea9f1f18 826:6d7a45c8464a
14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 14 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 15 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 16 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 17 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
18 # 18 #
19 # $Id: admin.py,v 1.15 2002-06-17 23:14:44 richard Exp $ 19 # $Id: admin.py,v 1.16 2002-07-09 04:19:09 richard Exp $
20 20
21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil 21 import sys, os, getpass, getopt, re, UserDict, shlex, shutil
22 try: 22 try:
23 import csv 23 import csv
24 except ImportError: 24 except ImportError:
962 elif m['date']: 962 elif m['date']:
963 pack_before = date.Date(value) 963 pack_before = date.Date(value)
964 self.db.pack(pack_before) 964 self.db.pack(pack_before)
965 return 0 965 return 0
966 966
967 def do_reindex(self, args):
968 '''Usage: reindex
969 Re-generate an instance's search indexes.
970
971 This will re-generate the search indexes for an instance. This will
972 typically happen automatically.
973 '''
974 self.db.indexer.force_reindex()
975 self.db.reindex()
976 return 0
977
967 def run_command(self, args): 978 def run_command(self, args):
968 '''Run a single command 979 '''Run a single command
969 ''' 980 '''
970 command = args[0] 981 command = args[0]
971 982
1112 tool = AdminTool() 1123 tool = AdminTool()
1113 sys.exit(tool.main()) 1124 sys.exit(tool.main())
1114 1125
1115 # 1126 #
1116 # $Log: not supported by cvs2svn $ 1127 # $Log: not supported by cvs2svn $
1128 # Revision 1.15 2002/06/17 23:14:44 richard
1129 # . #569415 ] {version}
1130 #
1117 # Revision 1.14 2002/06/11 06:41:50 richard 1131 # Revision 1.14 2002/06/11 06:41:50 richard
1118 # Removed prompt for admin email in initialisation. 1132 # Removed prompt for admin email in initialisation.
1119 # 1133 #
1120 # Revision 1.13 2002/05/30 23:58:14 richard 1134 # Revision 1.13 2002/05/30 23:58:14 richard
1121 # oops 1135 # oops

Roundup Issue Tracker: http://roundup-tracker.org/