Keep the task alive during step callbacks. Thanks Madrang

This commit is contained in:
cmdr2 2023-04-21 20:59:14 +05:30
parent eb16296873
commit f7235cf82c

View File

@ -317,6 +317,9 @@ def thread_render(device):
def step_callback():
global current_state_error
task_cache.keep(id(task), TASK_TTL)
session_cache.keep(task.task_data.session_id, TASK_TTL)
if (
isinstance(current_state_error, SystemExit)
or isinstance(current_state_error, StopAsyncIteration)