use the already written darned function

This commit is contained in:
Martin A. Brown 2016-03-09 20:53:21 -08:00
parent 7e3fa95813
commit e2532d4ffb
1 changed files with 4 additions and 7 deletions

View File

@ -426,13 +426,10 @@ def collectWorkset(config, args):
inv = None inv = None
if stati: if stati:
oldsize = len(workset) docs = getDocumentsByStatus(inv.all.values(), stati)
for status in stati: workset.update(docs)
collection = getattr(inv, status) if docs:
workset.update(collection.values()) logger.info("Added %d docs, found by status class .", len(docs))
growth = len(workset) - oldsize
if growth:
logger.info("Added %d docs, found by status class .", growth)
unknownargs = None unknownargs = None
if remainder: if remainder: