Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87db5d0

Browse files
committed
minor bug fix to avoid duplicates - #297
1 parent c3f1e19 commit 87db5d0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/utils/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,15 +190,15 @@ def write(self, value, status=CONTENT_STATUS.IN_PROGRESS, content_type=None):
190190
# Ignore all non-relevant messages
191191
return
192192

193-
#print >>sys.__stdout__, "value: %s\nstatus: %d\ncontent_type: %d\nkb.partRun: %s\n--------------" % (value, status, content_type, kb.partRun)
194-
195193
output = conf.database_cursor.execute("SELECT id, status, value FROM data WHERE taskid = ? AND content_type = ?",
196194
(self.taskid, content_type))
197195

196+
#print >>sys.__stdout__, "output: %s\nvalue: %s\nstatus: %d\ncontent_type: %d\nkb.partRun: %s\n--------------" % (output, value, status, content_type, kb.partRun)
197+
198198
# Delete partial output from IPC database if we have got a complete output
199199
if status == CONTENT_STATUS.COMPLETE:
200200
if len(output) > 0:
201-
for index in xrange(0, len(output)-1):
201+
for index in xrange(0, len(output)):
202202
if output[index][1] == CONTENT_STATUS.COMPLETE:
203203
insert = False
204204
else:

0 commit comments

Comments
 (0)