if args.domain is not None and args.domain != "":
logger.debug("Fetching args.domain='%s'", args.domain)
- database.cursor.execute("SELECT domain FROM instances WHERE domain = ?", [args.domain])
+ database.cursor.execute("SELECT domain, software FROM instances WHERE domain = ?", [args.domain])
elif args.software is not None and args.software != "":
logger.info("Fetching domains for args.software='%s'", args.software)
- database.cursor.execute("SELECT domain FROM instances WHERE software = ?", [args.software])
+ database.cursor.execute("SELECT domain, software FROM instances WHERE software = ?", [args.software])
else:
logger.info("Fetching domains for recently updated ...")
- database.cursor.execute("SELECT domain FROM instances WHERE last_nodeinfo < ? OR last_nodeinfo IS NULL", [time.time() - config.get("recheck_block")])
+ database.cursor.execute("SELECT domain, software FROM instances WHERE last_nodeinfo < ? OR last_nodeinfo IS NULL", [time.time() - config.get("recheck_block")])
domains = database.cursor.fetchall()
for row in domains:
logger.debug("row[]='%s'", type(row))
try:
- logger.info("Updating nodeinfo for row[domain]='%s' ...", row["domain"])
+ logger.info("Updating nodeinfo for row[domain]='%s',row[software]='%s' ...", row["domain"], row["software"])
software = federation.determine_software(row["domain"])
- logger.info("Determined software='%s'", software)
- instances.set_software(row["domain"], software)
+ logger.debug("Determined software='%s'", software)
+ if software != row["software"]:
+ logger.warning("Software type has changed from '%s' to '%s'!", row["software"], software)
+ instances.set_software(row["domain"], software)
+
instances.set_success(row["domain"])
except network.exceptions as exception:
logger.warning("Exception '%s' during updating nodeinfo for row[domain]='%s'", type(exception), row["domain"])