feat(wfe-core): add LogSink trait and wire lifecycle publisher into executor
LogSink trait for real-time step output streaming. Added to StepExecutionContext as optional field (backward compatible). Threaded through WorkflowExecutor and WorkflowHostBuilder. Wired LifecyclePublisher.publish() into executor at 5 points: StepStarted, StepCompleted, Error, Completed, Terminated. Also added lifecycle events to host start/suspend/resume/terminate.
This commit is contained in:
@@ -69,6 +69,7 @@ mod tests {
|
||||
workflow: &instance,
|
||||
cancellation_token: tokio_util::sync::CancellationToken::new(),
|
||||
host_context: None,
|
||||
log_sink: None,
|
||||
};
|
||||
mw.pre_step(&ctx).await.unwrap();
|
||||
}
|
||||
@@ -88,6 +89,7 @@ mod tests {
|
||||
workflow: &instance,
|
||||
cancellation_token: tokio_util::sync::CancellationToken::new(),
|
||||
host_context: None,
|
||||
log_sink: None,
|
||||
};
|
||||
let result = ExecutionResult::next();
|
||||
mw.post_step(&ctx, &result).await.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user