Merge pull request #1189 from cmdr2/beta

Keep the task alive during step callbacks. Thanks Madrang
This commit is contained in:
cmdr2 2023-04-22 14:35:57 +05:30 committed by GitHub
commit 49b2fc5b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)