break
# DEBUG: print(f"DEBUG: Adding '{len(peers)}' for domain='{domain}'")
- instances.set("total_peers", domain, len(peers))
+ instances.set_data("total_peers", domain, len(peers))
# DEBUG: print(f"DEBUG: Updating last_instance_fetch for domain='{domain}' ...")
instances.update_last_instance_fetch(domain)
# DEBUG: print(f"DEBUG: count={count}")
if count == 0:
- # DEBUG: print(f"DEBUG: API is no more returning new instances, aborting loop!")
+ # DEBUG: print("DEBUG: API is no more returning new instances, aborting loop!")
break
- except BaseException as exception:
- print("WARNING: Caught error, exiting loop:", domain, exception)
- instances.update_last_error(domain, exception)
+ except BaseException as exc:
+ print("WARNING: Caught error, exiting loop:", domain, exc)
+ instances.update_last_error(domain, exc)
offset = 0
break
# DEBUG: print(f"DEBUG: count={count}")
if count == 0:
- # DEBUG: print(f"DEBUG: API is no more returning new instances, aborting loop!")
+ # DEBUG: print("DEBUG: API is no more returning new instances, aborting loop!")
break
- except BaseException as exception:
- print("ERROR: Exception during POST:", domain, exception)
- instances.update_last_error(domain, exception)
+ except BaseException as exc:
+ print("ERROR: Exception during POST:", domain, exc)
+ instances.update_last_error(domain, exc)
offset = 0
break