add timeout to client

This commit is contained in:
Yizhou Chi 2024-09-11 16:14:50 +08:00
parent 4dfa01295e
commit eaf1b62343

View file

@ -111,7 +111,7 @@ async def load_execute_notebook(role):
codes = [task.code for task in tasks if task.code]
executor = role.execute_code
executor.nb = nbformat.v4.new_notebook()
executor.nb_client = NotebookClient(executor.nb)
executor.nb_client = NotebookClient(executor.nb, timeout=executor.timeout)
# await executor.build()
for code in codes:
outputs, success = await executor.run(code)