Skip to main content

task_context

Macro task_context 

Source
macro_rules! task_context {
    () => { ... };
}
Expand description

Macro to access the task execution context from within a task.

Returns Option<TaskExecutionContext>None if called outside of task execution context.

Usage:

if let Some(ctx) = task_context!() {
    println!("workflow: {}, task: {}", ctx.workflow_id, ctx.task_id);
}