Fix #5 ChunkedEncodingError
This commit is contained in:
pare
6ac6a05fbc
commit
739c8bfb74
S'han modificat 1 arxius amb 27 adicions i 2 eliminacions
|
@ -12,6 +12,13 @@ import ray
|
|||
|
||||
ray.init(num_cpus = 32) # Specify this system CPUs.
|
||||
|
||||
from ray.exceptions import (
|
||||
RaySystemError,
|
||||
RayError,
|
||||
RayTaskError,
|
||||
ObjectStoreFullError,
|
||||
)
|
||||
|
||||
apis = ['/api/v1/instance?',
|
||||
'/nodeinfo/2.0?',
|
||||
'/nodeinfo/2.0.json?',
|
||||
|
@ -82,6 +89,8 @@ def getsoft(server):
|
|||
return
|
||||
if server.find(":") != -1:
|
||||
return
|
||||
if server == 'z.fedipen.xyz':
|
||||
return
|
||||
|
||||
soft = ''
|
||||
|
||||
|
@ -199,6 +208,16 @@ def getsoft(server):
|
|||
|
||||
pass
|
||||
|
||||
except requests.exceptions.ChunkedEncodingError as chunk_err:
|
||||
|
||||
print(f'ChunkedEncodingError! {server}')
|
||||
pass
|
||||
|
||||
except ray.exceptions.RaySystemError as ray_sys_error:
|
||||
|
||||
print(ray_sys_error)
|
||||
pass
|
||||
|
||||
else:
|
||||
|
||||
if is_nodeinfo:
|
||||
|
@ -427,9 +446,15 @@ if __name__ == '__main__':
|
|||
|
||||
ray_start = time.time()
|
||||
|
||||
results = ray.get([getsoft.remote(server) for server in world_servers])
|
||||
try:
|
||||
|
||||
print(f"duration = {time.time() - ray_start}.\nprocessed servers: {len(results)}")
|
||||
results = ray.get([getsoft.remote(server) for server in world_servers])
|
||||
|
||||
print(f"duration = {time.time() - ray_start}.\nprocessed servers: {len(results)}")
|
||||
|
||||
except:
|
||||
|
||||
pass
|
||||
|
||||
finish = datetime.now()
|
||||
|
||||
|
|
Loading…
Referencia en una nova incidència