logger.debug("Checking if blocker='%s' has pending updates ...", blocker)
if instances.has_pending(blocker):
logger.debug("Flushing updates for blocker='%s' ...", blocker)
- instances.update_data(blocker)
+ instances.update(blocker)
logger.debug("Invoking commit() ...")
database.connection.commit()
logger.debug("Checking if blocker='%s' has pending updates ...", blocker)
if instances.has_pending(blocker):
logger.debug("Flushing updates for blocker='%s' ...", blocker)
- instances.update_data(blocker)
+ instances.update(blocker)
logger.debug("Success! - EXIT!")
return 0
logger.debug("Checking if blocker='%s' has pending updates ...", blocker)
if instances.has_pending(blocker):
logger.debug("Flushing updates for blocker='%s' ...", blocker)
- instances.update_data(blocker)
+ instances.update(blocker)
logger.debug("Success! - EXIT!")
return 0
except network.exceptions as exception:
logger.warning("Exception '%s' during fetching instances (fetch_instances) from args.domain='%s'", type(exception), args.domain)
instances.set_last_error(args.domain, exception)
- instances.update_data(args.domain)
+ instances.update(args.domain)
return 100
if args.single:
logger.debug("Checking if blocker='%s' has pending updates ...", block["blocker"])
if instances.has_pending(block["blocker"]):
logger.debug("Flushing updates for block[blocker]='%s' ...", block["blocker"])
- instances.update_data(block["blocker"])
+ instances.update(block["blocker"])
logger.debug("Invoking commit() ...")
database.connection.commit()
if instances.has_pending(blocker):
logger.debug("Flushing updates for blocker='%s' ...", blocker)
- instances.update_data(blocker)
+ instances.update(blocker)
logger.debug("Invoking commit() ...")
database.connection.commit()
if instances.has_pending(row["domain"]):
logger.debug("Flushing updates for blocker='%s' ...", row["domain"])
- instances.update_data(row["domain"])
+ instances.update(row["domain"])
logger.debug("Invoking commit() ...")
database.connection.commit()
instances.set_last_error(row["domain"], exception)
instances.set_last_nodeinfo(row["domain"])
- instances.update_data(row["domain"])
+ instances.update(row["domain"])
cnt = cnt + 1
logger.debug("Success! - EXIT!")
logger.warning("Exception '%s' during fetching from relay '%s': '%s'", type(exception), row["domain"], str(exception))
instances.set_last_error(row["domain"], exception)
instances.set_last_instance_fetch(row["domain"])
- instances.update_data(row["domain"])
+ instances.update(row["domain"])
continue
doc = bs4.BeautifulSoup(raw, features="html.parser")
instances.set_total_peers(row["domain"], peers)
logger.debug("Flushing data for row[domain]='%s'", row["domain"])
- instances.update_data(row["domain"])
+ instances.update(row["domain"])
logger.info("Checking %d domains ...", len(domains))
for row in domains:
logger.debug("name='%s' - DEOBFUSCATED!", name)
if instances.has_pending(blocker):
logger.debug("Flushing updates for blocker='%s' ...", blocker)
- instances.update_data(blocker)
+ instances.update(blocker)
if not domain_helper.is_wanted(name):
logger.debug("name='%s' is not wanted - SKIPPED!", name)
logger.debug("Checking if name='%s' has pending updates ...", name)
if instances.has_pending(name):
logger.debug("Flushing updates for name='%s' ...", name)
- instances.update_data(name)
+ instances.update(name)
logger.debug("processed='%s' - EXIT!", processed)
return processed
if instances.has_pending(domain):
logger.debug("Flushing updates for domain='%s' ...", domain)
- instances.update_data(domain)
+ instances.update(domain)
logger.debug("Invoking cookies.clear(%s) ...", domain)
cookies.clear(domain)
logger.debug("Checking if domain='%s' has pending updates ...", domain)
if instances.has_pending(domain):
logger.debug("Flushing updates for domain='%s' ...", domain)
- instances.update_data(domain)
+ instances.update(domain)
logger.debug("instance='%s',origin='%s',_DEPTH=%d reached!", instance, origin, _DEPTH)
if _DEPTH <= config.get("max_crawl_depth") and len(peerlist) >= config.get("min_peers_length"):
logger.debug("Checking if domain='%s' has pending updates ...", domain)
if instances.has_pending(domain):
logger.debug("Flushing updates for domain='%s' ...", domain)
- instances.update_data(domain)
+ instances.update(domain)
_DEPTH = _DEPTH - 1
logger.debug("EXIT!")
# Found info from node, such as nodeinfo URL, detection mode that needs to be
# written to database. Both arrays must be filled at the same time or else
-# update_data() will fail
+# update() will fail
_pending = {
# Detection mode
# NULL means all detection methods have failed (maybe still reachable instance)
logger.debug("has='%s' - EXIT!", has)
return has
-def update_data(domain: str):
+def update(domain: str):
logger.debug("domain='%s' - CALLED!", domain)
domain_helper.raise_on(domain)
if not has_pending(domain):
logger.debug("Checking if domain='%s' has pending updates ...", domain)
if has_pending(domain):
logger.debug("Flushing updates for domain='%s' ...", domain)
- update_data(domain)
+ update(domain)
logger.debug("EXIT!")