pub struct TaskEvent {
pub account: String,
pub platform: String,
pub module: Option<Vec<String>>,
pub priority: Priority,
pub run_id: Uuid,
}Expand description
Base task model.
Defines minimal task identity with account, platform, and module information.
Fields§
§account: StringAccount identifier.
platform: StringPlatform identifier.
module: Option<Vec<String>>Module list (optional; empty means all modules).
priority: PriorityPriority.
run_id: UuidRun identifier.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaskEvent
impl<'de> Deserialize<'de> for TaskEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl EventProcessorTrait<TaskEvent, Task> for TaskModelProcessor
impl EventProcessorTrait<TaskEvent, Task> for TaskModelProcessor
fn pre_status(&self, input: &TaskEvent) -> Option<EventEnvelope>
fn finish_status( &self, input: &TaskEvent, output: &Task, ) -> Option<EventEnvelope>
fn working_status(&self, input: &TaskEvent) -> Option<EventEnvelope>
fn error_status( &self, input: &TaskEvent, error: &Error, ) -> Option<EventEnvelope>
fn retry_status( &self, input: &TaskEvent, retry_policy: &RetryPolicy, ) -> Option<EventEnvelope>
Source§impl From<&TaskEvent> for TaskModelEvent
impl From<&TaskEvent> for TaskModelEvent
Source§impl From<TaskEvent> for UnifiedTaskInput
impl From<TaskEvent> for UnifiedTaskInput
Source§impl Identifiable for TaskEvent
impl Identifiable for TaskEvent
Source§impl Offloadable for TaskEvent
impl Offloadable for TaskEvent
fn should_offload(&self, _threshold: usize) -> bool
fn offload<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_storage: &'life1 Arc<dyn BlobStorage>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reload<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_storage: &'life1 Arc<dyn BlobStorage>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Prioritizable for TaskEvent
impl Prioritizable for TaskEvent
fn get_priority(&self) -> Priority
Source§impl ProcessorTrait<TaskEvent, Task> for TaskModelProcessor
impl ProcessorTrait<TaskEvent, Task> for TaskModelProcessor
Source§fn process<'life0, 'async_trait>(
&'life0 self,
input: TaskEvent,
context: ProcessorContext,
) -> Pin<Box<dyn Future<Output = ProcessorResult<Task>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>(
&'life0 self,
input: TaskEvent,
context: ProcessorContext,
) -> Pin<Box<dyn Future<Output = ProcessorResult<Task>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Processes input data.
Source§fn pre_process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 TaskEvent,
_context: &'life2 ProcessorContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn pre_process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 TaskEvent,
_context: &'life2 ProcessorContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Optional pre-processing hook.
Source§fn handle_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 TaskEvent,
error: Error,
_context: &'life2 ProcessorContext,
) -> Pin<Box<dyn Future<Output = ProcessorResult<Task>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn handle_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 TaskEvent,
error: Error,
_context: &'life2 ProcessorContext,
) -> Pin<Box<dyn Future<Output = ProcessorResult<Task>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Optional error handling hook.
Source§fn post_process<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_input: &'life1 Input,
_output: &'life2 Output,
_context: &'life3 ProcessorContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn post_process<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_input: &'life1 Input,
_output: &'life2 Output,
_context: &'life3 ProcessorContext,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Optional post-processing hook.
Source§fn should_process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 Input,
_context: &'life2 ProcessorContext,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn should_process<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_input: &'life1 Input,
_context: &'life2 ProcessorContext,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Optional predicate to decide whether this input should be processed.
Auto Trait Implementations§
impl Freeze for TaskEvent
impl RefUnwindSafe for TaskEvent
impl Send for TaskEvent
impl Sync for TaskEvent
impl Unpin for TaskEvent
impl UnsafeUnpin for TaskEvent
impl UnwindSafe for TaskEvent
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
Converts
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>
Converts
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