def ParseBugPages(filesq, procId, q): # #if not str(procId) in md.keys(): # md[str(procId)] = [] print('Started:', procId) i = 0 while not filesq.empty(): file = filesq.get() i += 1 if file.startswith('-1--') or file.startswith('-2--'): continue print('Processing (in ' + str(procId) + ') : ', 'Remaining', filesq.qsize()) data, stat = Helpers.getBugData(file.replace('.html', ''), Helpers.ExtractBugData) if stat < 0: shutil.move(Helpers.bpPath + file, Helpers.bpPath + str(stat) + '--' + file) continue q.put(data) #ret = dbh.InsertBug(data) #print ('In ',procId,' :', data['bug'],ret) print('Finished:', procId)