def is_primitive(var: any) -> bool:
#print(f"DEBUG: var[]='{type(var)}' - CALLED!")
- return type(var) in {int, str, float, bool}
+ return type(var) in {int, str, float, bool, NoneType}
def set_instance_data(key: str, domain: str, value: any):
#print(f"DEBUG: key='{key}',domain='{domain}',value[]='{type(value)}' - CALLED!")
raise ValueError(f"No fields have been set, but method invoked, domain='{domain}'")
# DEBUG: print(f"DEBUG: sql_string='{sql_string}',fields()={len(fields)}")
- sql = "UPDATE instances SET" + sql_string + " last_status_code = NULL, last_error_details = NULL, last_updated = TIME() WHERE domain = ? LIMIT 1"
+ sql = "UPDATE instances SET" + sql_string + " last_updated = TIME() WHERE domain = ? LIMIT 1"
# DEBUG: print("DEBUG: sql:", sql)
try:
if has_pending_instance_data(domain):
# DEBUG: print(f"DEBUG: domain='{domain}' has pending nodeinfo being updated ...")
+ set_instance_data("last_status_code" , domain, None)
+ set_instance_data("last_error_details", domain, None)
update_instance_data(domain)
remove_pending_error(domain)