current
Thecurrent object provides access to runtime information about the currently executing flow, run, step, and task.
Usage
Properties
is_running_flow
bool- True if called inside a run, False otherwise.
flow_name
str | None- Flow name.
run_id
str | None- Run ID.
step_name
str | None- Step name.
task_id
str | None- Task ID.
retry_count
@retry decorator is used and the first attempt fails, this
property returns the number of times the task was attempted prior
to the current attempt.
Returns:
int- The retry count.
origin_run_id
str | None- Run ID of the original run.
pathspec
current.task.pathspec.
Returns:
str | None- Pathspec.
task
Task | None- Current task.
run
Run | None- Current run.
namespace
str- Namespace.
username
str | None- User name.
tempdir
str | None- Temporary directory.
