18 from typing
import Optional
20 from ..entities
import TaskRun
23 class _CurrentTaskRunContainer:
25 taskRun: Optional[TaskRun] =
None
28 def setCurrentTaskRun(taskRun: Optional[TaskRun]) ->
None:
29 _CurrentTaskRunContainer.taskRun = taskRun
32 def currentTaskRun() -> TaskRun:
36 TaskRun -> Currently executing Task
39 taskRun = _CurrentTaskRunContainer.taskRun
41 raise ValueError(
"TaskRun is not currently executing")