software = "misskey"
else:
# NOISY-DEBUG: print("DEBUG: Using name:", domain, json["software"]["name"])
- software = json["software"]["name"]
+ software = json["software"]["name"].lower()
except:
print("WARNING: Could not determine software type:", domain)
if (peerlist is None):
print("ERROR: Cannot fetch peers:", domain)
+ return
- fba.c.execute(
- "SELECT domain FROM instances WHERE domain = ? LIMIT 1", [domain]
- )
-
- if fba.c.fetchone() == None:
- # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, origin)
- fba.add_instance(domain, origin, sys.argv[0])
+ fba.c.execute(
+ "SELECT domain FROM instances WHERE domain = ? LIMIT 1", [domain]
+ )
- fba.conn.commit()
- return
+ if fba.c.fetchone() == None:
+ # NOISY-DEBUG: print("DEBUG: Adding new domain:", domain, origin)
+ fba.add_instance(domain, origin, sys.argv[0])
+ print(f"INFO: Checking {len(peerlist)} instances from {domain} ...")
for instance in peerlist:
instance = instance.lower()
if instance.find("@") > 0: