This commit is contained in:
Cyberes 2023-10-05 18:15:02 -06:00
parent 64d7a9edbb
commit 10eb6269b7
2 changed files with 1 additions and 2 deletions

View File

@ -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))

View File

@ -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: