Skip to content

Commit 5aa3bbe

Browse files
author
Richard Jones
committed
woo, that was quick
1 parent 38ed547 commit 5aa3bbe

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4+
2006-??-?? 1.1.2
5+
Fixed:
6+
- progress display in roundup-admin reindex
7+
8+
49
2006-03-03 1.1.1
510
Fixed:
611
- failure with browsers not sending "Accept-Language" header

roundup/backends/back_anydbm.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
#$Id: back_anydbm.py,v 1.196 2006-03-03 02:02:50 richard Exp $
18+
#$Id: back_anydbm.py,v 1.197 2006-03-03 02:51:13 richard Exp $
1919
'''This module defines a backend that saves the hyperdatabase in a
2020
database chosen by anydbm. It is guaranteed to always be available in python
2121
versions >2.1.1 (the dumbdbm fallback in 2.1.1 and earlier has several
@@ -35,7 +35,7 @@
3535

3636
import whichdb, os, marshal, re, weakref, string, copy, time, shutil, logging
3737

38-
from roundup import hyperdb, date, password, roundupdb, security
38+
from roundup import hyperdb, date, password, roundupdb, security, support
3939
from roundup.backends import locking
4040
from roundup.i18n import _
4141

@@ -123,14 +123,19 @@ def getSessionManager(self):
123123
def getOTKManager(self):
124124
return OneTimeKeys(self)
125125

126-
def reindex(self, classname=None):
126+
def reindex(self, classname=None, show_progress=False):
127127
if classname:
128128
classes = [self.getclass(classname)]
129129
else:
130130
classes = self.classes.values()
131131
for klass in classes:
132-
for nodeid in klass.list():
133-
klass.index(nodeid)
132+
if show_progress:
133+
for nodeid in support.Progress('Reindex %s'%klass.classname,
134+
klass.list()):
135+
klass.index(nodeid)
136+
else:
137+
for nodeid in klass.list():
138+
klass.index(nodeid)
134139
self.indexer.save_index()
135140

136141
def __repr__(self):

roundup/support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def display(self):
114114
elif self.total:
115115
s = '%s %2d%%'%(self.info, self.num * 100. / self.total)
116116
else:
117-
s = '%s 0%% (ETA %02d:%02d:%02d)'%(self.info, H, M, S)
117+
s = '%s %d done'%(self.info, self.num)
118118
sys.stdout.write(s + ' '*(75-len(s)) + '\r')
119119
sys.stdout.flush()
120120

0 commit comments

Comments
 (0)