Skip to main content

JobExecutionListener

Trait JobExecutionListener 

Source
pub trait JobExecutionListener: Send + Sync {
    // Required methods
    fn before_job<'a>(
        &'a self,
        context: ListenerContext<'a>,
    ) -> BoxFuture<'a, Result<(), ListenerError>>;
    fn after_job<'a>(
        &'a self,
        context: ListenerContext<'a>,
        outcome: TaskletExecutionOutcome,
    ) -> BoxFuture<'a, Result<(), ListenerError>>;
}
Expand description

A dynamically dispatched job lifecycle listener.

Required Methods§

Source

fn before_job<'a>( &'a self, context: ListenerContext<'a>, ) -> BoxFuture<'a, Result<(), ListenerError>>

Runs before the job becomes STARTED.

Source

fn after_job<'a>( &'a self, context: ListenerContext<'a>, outcome: TaskletExecutionOutcome, ) -> BoxFuture<'a, Result<(), ListenerError>>

Runs after the nested step has a provisional outcome and before the job receives its final status.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§