"useragent" : "Mozilla/5.0 (Windows NT 10.0; rv:102.0) Gecko/20100101 Firefox/113.0",
"connection_timeout": 30,
"read_timeout" : 5,
+ "nodeinfo_connection_timeout": 3,
+ "nodeinfo_read_timeout" : 2,
"bot_enabled" : false,
"bot_instance" : "https://example.com",
"bot_token" : "",
try:
# DEBUG: print("DEBUG: Fetching request:", request)
- res = reqto.get(request, headers=api_headers, timeout=(config.get("connection_timeout"), config.get("read_timeout")))
+ res = reqto.get(request, headers=api_headers, timeout=(config.get("nodeinfo_connection_timeout"), config.get("nodeinfo_read_timeout")))
data = json_from_response(res)
# DEBUG: print(f"DEBUG: res.ok={res.ok},res.status_code={res.status_code},data[]='{type(data)}'")
data = {}
try:
- res = reqto.get(f"https://{domain}/.well-known/nodeinfo", headers=api_headers, timeout=(config.get("connection_timeout"), config.get("read_timeout")))
+ res = reqto.get(f"https://{domain}/.well-known/nodeinfo", headers=api_headers, timeout=(config.get("nodeinfo_connection_timeout"), config.get("nodeinfo_read_timeout")))
data = json_from_response(res)
# DEBUG: print("DEBUG: domain,res.ok,data[]:", domain, res.ok, type(data))
elif not has_pending_instance_data(domain):
raise Exception(f"Domain '{domain}' has no pending instance data, but function invoked")
- # DEBUG: print(f"DEBUG: Updating nodeinfo for domain='{domain}' ...")
+ # DEBUG: print(f"DEBUG: Updating instance data for domain='{domain}' ...")
sql_string = ''
fields = list()
for key in _pending: