continue
logger.debug("row[domain]='%s' - BEFORE!", row["domain"])
- row["domain"] = row["domain"].encode("idna").decode("utf-8")
- logger.debug("row[domain]='%s' - AFTER!", row["domain"])
+ domain = row["domain"].encode("idna").decode("utf-8")
+ logger.debug("domain='%s' - AFTER!", domain)
- if not utils.is_domain_wanted(row["domain"]):
- logger.warning("row[domain]='%s' is not wanted - SKIPPED!", row["domain"])
+ if not utils.is_domain_wanted(domain):
+ logger.warning("domain='%s' is not wanted - SKIPPED!", domain)
continue
- elif instances.is_registered(row["domain"]):
- logger.debug("row[domain]='%s' is already registered - SKIPPED!", row["domain"])
+ elif instances.is_registered(domain):
+ logger.debug("domain='%s' is already registered - SKIPPED!", domain)
continue
- elif instances.is_recent(row["domain"]):
- logger.debug("row[domain]='%s' has been recently crawled - SKIPPED!", row["domain"])
+ elif instances.is_recent(domain):
+ logger.debug("domain='%s' has been recently crawled - SKIPPED!", domain)
continue
- logger.debug("Fetching instances from row[domain]='%s' ...", row["domain"])
- federation.fetch_instances(row["domain"], None, None, inspect.currentframe().f_code.co_name)
+ logger.debug("Fetching instances from domain='%s' ...", domain)
+ federation.fetch_instances(domain, None, None, inspect.currentframe().f_code.co_name)
except network.exceptions as exception:
logger.warning("Cannot fetch graphql,exception[%s]:'%s' - EXIT!", type(exception), str(exception))
continue
logger.debug("row[domain]='%s' - BEFORE!", row["domain"])
- row["domain"] = row["domain"].encode("idna").decode("utf-8")
- logger.debug("row[domain]='%s' - AFTER!", row["domain"])
+ domain = row["domain"].encode("idna").decode("utf-8")
+ logger.debug("domain='%s' - AFTER!", domain)
- if not utils.is_domain_wanted(row["domain"]):
- logger.warning("Domain row[domain]='%s' is not wanted - SKIPPED!", row["domain"])
+ if not utils.is_domain_wanted(domain):
+ logger.warning("Domain domain='%s' is not wanted - SKIPPED!", domain)
continue
try:
- logger.info("Fetching instances for domain='%s',origin='%s',software='%s',nodeinfo_url='%s'", row["domain"], row["origin"], row["software"], row["nodeinfo_url"])
- federation.fetch_instances(row["domain"], row["origin"], row["software"], inspect.currentframe().f_code.co_name, row["nodeinfo_url"])
+ logger.info("Fetching instances for domain='%s',origin='%s',software='%s',nodeinfo_url='%s'", domain, row["origin"], row["software"], row["nodeinfo_url"])
+ federation.fetch_instances(domain, row["origin"], row["software"], inspect.currentframe().f_code.co_name, row["nodeinfo_url"])
except network.exceptions as exception:
- logger.warning("Exception '%s' during fetching instances (fetch_instances) from row[domain]='%s'", type(exception), row["domain"])
- instances.set_last_error(row["domain"], exception)
+ logger.warning("Exception '%s' during fetching instances (fetch_instances) from domain='%s'", type(exception), domain)
+ instances.set_last_error(domain, exception)
logger.debug("Success - EXIT!")
return 0