# Fetch records
database.cursor.execute("SELECT domain, origin, software FROM instances WHERE software = ? ORDER BY last_instance_fetch ASC", [software])
rows = database.cursor.fetchall()
+
+ logger.debug("rows()=%d", len(rows))
else:
# Loop through some instances
logger.debug("Querying database for peer sources ...")
ORDER BY total_peers DESC, last_response_time ASC, last_updated ASC"
)
rows = database.cursor.fetchall()
+ logger.debug("rows()=%d", len(rows))
logger.info("Checking %d entries ...", len(rows))
for row in rows: