rows = fetched["json"]
- logger.debug("rows(%d)[]='%s'", len(rows), type(rows))
+ logger.debug("rows(%d)[]='%s',step=%d", len(rows), type(rows), step)
if len(rows) == 0:
logger.debug("Returned zero bytes, domain='%s' - BREAK!", domain)
break
logger.debug("Raising offset by step=%d", step)
offset = offset + step
- already = 0
+ added = 0
logger.debug("rows(%d))[]='%s'", len(rows), type(rows))
for row in rows:
logger.debug("row()=%d", len(row))
continue
elif row["host"] in peers:
logger.debug("Not adding row[host]='%s', already found - SKIPPED!", row['host'])
- already = already + 1
continue
logger.debug("Adding peer: row[host]='%s'", row['host'])
+ added = added + 1
peers.append(row["host"])
- if already == len(rows):
- logger.debug("Host returned same set of %d instance(s) - BREAK!", already)
+ logger.debug("added=%d,rows()=%d", added, len(rows))
+ if added == 0:
+ logger.debug("Host returned already added (%d) peers - BREAK!", len(rows))
break
logger.debug("peers()=%d - EXIT!", len(peers))