Merge cluster to master #3
|
@ -27,6 +27,4 @@ def log_to_db(ip: str, token: str, prompt: str, response: Union[str, None], gen_
|
||||||
'is_error': is_error
|
'is_error': is_error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for k, v in data['kwargs'].items():
|
|
||||||
print(k, type(v))
|
|
||||||
r.publish('database-logger', pickle.dumps(data))
|
r.publish('database-logger', pickle.dumps(data))
|
||||||
|
|
|
@ -66,6 +66,7 @@ def need_to_wait(backend_url: str):
|
||||||
concurrent_gens = cluster_config.get_backend(backend_url).get('concurrent_gens', 1)
|
concurrent_gens = cluster_config.get_backend(backend_url).get('concurrent_gens', 1)
|
||||||
s = time.time()
|
s = time.time()
|
||||||
while active_workers >= concurrent_gens:
|
while active_workers >= concurrent_gens:
|
||||||
|
print('worker waiting')
|
||||||
time.sleep(0.01)
|
time.sleep(0.01)
|
||||||
e = time.time()
|
e = time.time()
|
||||||
if e - s > 0.5:
|
if e - s > 0.5:
|
||||||
|
|
Reference in New Issue