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,10 +446,16 @@ if __name__ == '__main__':
|
|||
|
||||
ray_start = time.time()
|
||||
|
||||
try:
|
||||
|
||||
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()
|
||||
|
||||
save_time(program, start, finish)
|
||||
|
|
Loading…
Referencia en una nova incidència