Struct TaskManager

Source
pub struct TaskManager { /* private fields */ }

Implementations§

Source§

impl TaskManager

Source

pub fn new(config: TaskConfig) -> Self

Source

pub fn set_event_bus(&mut self, event_bus: Arc<EventBusManager>)

Source

pub async fn submit_task(&self, definition: TaskDefinition) -> Result<Uuid>

Source

pub async fn cancel_task(&self, task_id: Uuid) -> Result<bool>

Source

pub async fn get_task_info(&self, task_id: Uuid) -> Option<TaskInfo>

Source

pub async fn list_tasks( &self, status_filter: Option<TaskStatus>, category_filter: Option<TaskCategory>, limit: Option<usize>, ) -> Vec<TaskInfo>

Source

pub async fn wait_for_task( &self, task_id: Uuid, timeout_duration: Option<Duration>, ) -> Result<TaskInfo>

Source

pub async fn get_stats(&self) -> TaskManagerStats

Source

pub async fn cleanup_old_tasks(&self, max_age: Duration) -> u64

Trait Implementations§

Source§

impl Debug for TaskManager

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Manager for TaskManager

Source§

fn name(&self) -> &str

Returns the manager name
Source§

fn id(&self) -> Uuid

Returns the manager ID
Source§

fn initialize<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initializes the manager
Source§

fn shutdown<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shuts down the manager
Source§

fn status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = ManagerStatus> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns current status
Source§

fn health_check<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = HealthStatus> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Performs health check
Source§

fn pause<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Pauses the manager
Source§

fn resume<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Resumes the manager
Source§

fn restart<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Restarts the manager
Source§

fn get_config<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Gets current configuration
Source§

fn update_config<'life0, 'async_trait>( &'life0 mut self, _config: Value, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Updates configuration
Source§

fn dependencies(&self) -> Vec<String>

Returns dependencies
Source§

fn priority(&self) -> i32

Returns initialization priority
Source§

fn is_essential(&self) -> bool

Checks if manager is essential for system operation
Source§

fn version(&self) -> Option<String>

Returns manager version
Source§

fn description(&self) -> Option<String>

Returns manager description
Source§

fn supports_runtime_reload(&self) -> bool

Checks if manager supports runtime reloading
Source§

fn reload_config<'life0, 'async_trait>( &'life0 mut self, _config: Value, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Reloads configuration at runtime
Source§

fn required_permissions(&self) -> Vec<String>

Returns required permissions
Source§

fn platform_requirements(&self) -> PlatformRequirements

Returns platform requirements

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> InitializeFromFunction<T> for T

§

fn initialize_from_function(f: fn() -> T) -> T

Create an instance of this type from an initialization function
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<Ret> SpawnIfAsync<(), Ret> for Ret

§

fn spawn(self) -> Ret

Spawn the value into the dioxus runtime if it is an async block
§

impl<T, O> SuperFrom<T> for O
where O: From<T>,

§

fn super_from(input: T) -> O

Convert from a type to another type.
§

impl<T, O, M> SuperInto<O, M> for T
where O: SuperFrom<T, M>,

§

fn super_into(self) -> O

Convert from a type to another type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> PlatformSync for T
where T: Send + Sync,