summaryrefslogtreecommitdiffstats
path: root/populate.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2013-01-11 14:53:23 +0800
committerPeng Wu <alexepico@gmail.com>2013-01-11 14:53:23 +0800
commit2506a6ef3b307550c8d8e90a9a4dd94351e06d43 (patch)
tree60a4b36e80fc35869dff0ed97b2f2a14dee72f60 /populate.py
parent5ee8671c28f9c9e4fe667d86e5feac97eb8ebe35 (diff)
downloadtrainer-2506a6ef3b307550c8d8e90a9a4dd94351e06d43.tar.gz
trainer-2506a6ef3b307550c8d8e90a9a4dd94351e06d43.tar.xz
trainer-2506a6ef3b307550c8d8e90a9a4dd94351e06d43.zip
fixes epoch sign
Diffstat (limited to 'populate.py')
-rw-r--r--populate.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/populate.py b/populate.py
index 1414b17..d72d685 100644
--- a/populate.py
+++ b/populate.py
@@ -94,9 +94,11 @@ def handleOneDocument(infile, conn, length):
docfile.close()
- #sign epoch
- utils.sign_epoch(infilestatus, 'Populate')
- utils.store_status(infilestatuspath, infilestatus)
+ #sign epoch only after last pass
+ if N == length:
+ utils.sign_epoch(infilestatus, 'Populate')
+ utils.store_status(infilestatuspath, infilestatus)
+
return True
def handleOnePass(indexpath, workdir, length):