mirror of
https://github.com/aljazceru/dev-gpt.git
synced 2026-01-30 02:34:26 +01:00
refactor: cleanup
This commit is contained in:
@@ -34,14 +34,4 @@ def timeout_generator_wrapper(generator, timeout):
|
||||
except concurrent.futures.TimeoutError:
|
||||
raise GenerationTimeoutError(f"Generation took longer than {timeout} seconds")
|
||||
|
||||
return wrapper()
|
||||
|
||||
# def my_generator():
|
||||
# for i in range(10):
|
||||
# sleep(3)
|
||||
# yield 1
|
||||
#
|
||||
#
|
||||
# my_generator_with_timeout = timeout_generator_wrapper(my_generator, 2.9)
|
||||
# for item in my_generator_with_timeout():
|
||||
# print(item)
|
||||
return wrapper()
|
||||
Reference in New Issue
Block a user