pub enum RuntimeError {
MixedRegistrySources,
MissingRegistry {
worker_enabled: bool,
reaper_enabled: bool,
},
MissingTokioRuntime {
source: TryCurrentError,
},
TaskExitedUnexpectedly {
task: &'static str,
},
TaskJoin {
task: &'static str,
source: JoinError,
},
ShutdownTimeout {
timeout: Duration,
},
ShutdownTimeoutTooLarge {
timeout: Duration,
},
ShutdownTimeoutAfterTaskError {
timeout: Duration,
source: Box<RuntimeError>,
},
}Variants§
MixedRegistrySources
The supervisor builder received both direct registry and catalog
registration sources. Choose either SupervisorBuilder::with_registry
or SupervisorBuilder::with_catalog for a single builder.
MissingRegistry
The supervisor builder requires a job registry when the worker or reaper
loop is enabled, but none was provided. Call
SupervisorBuilder::with_registry before SupervisorBuilder::build.
MissingTokioRuntime
The supervisor builder must be called from within an active Tokio runtime
context. Ensure you are calling it inside a #[tokio::main], #[tokio::test],
or within a spawned task inside an existing runtime.
Fields
source: TryCurrentErrorTaskExitedUnexpectedly
A supervised runtime task exited cleanly before shutdown was requested. This is treated as an error because long-running loops should only exit in response to a shutdown signal. Investigate logs for the specific task that exited unexpectedly.
TaskJoin
A supervised task panicked or failed to join cleanly. Examine logs and process panic output for more details about the underlying task failure.
ShutdownTimeout
The supervisor did not complete shutdown within the requested timeout. Some tasks may not have received or responded to the shutdown signal. Consider increasing the timeout or investigating why tasks are shutting down slowly.
ShutdownTimeoutTooLarge
The requested shutdown timeout is too large to represent as a deadline. Use a smaller timeout value.
ShutdownTimeoutAfterTaskError
A supervised task failed (panicked or exited unexpectedly) and the remaining tasks could not be shut down within the timeout. The original task failure is available through the source error.
Trait Implementations§
Source§impl Debug for RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<RuntimeError> for Error
impl From<RuntimeError> for Error
Source§fn from(source: RuntimeError) -> Self
fn from(source: RuntimeError) -> Self
Auto Trait Implementations§
impl Freeze for RuntimeError
impl !RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnsafeUnpin for RuntimeError
impl !UnwindSafe for RuntimeError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more