pub struct Tasks {Show 14 fields
pub include_status: Option<HashSet<TaskStatus, RandomState>>,
pub include_labels: Option<Vec<LabelMatch, Global>>,
pub schedule_id: Option<Uuid>,
pub search: Option<String>,
pub added_after: Option<OffsetDateTime>,
pub added_before: Option<OffsetDateTime>,
pub finished_after: Option<OffsetDateTime>,
pub finished_before: Option<OffsetDateTime>,
pub target_after: Option<OffsetDateTime>,
pub target_before: Option<OffsetDateTime>,
pub kind: Option<String>,
pub order: TaskListOrder,
pub offset: u64,
pub limit: u64,
}
Expand description
Search options for retrieving a list of tasks.
Fields§
§include_status: Option<HashSet<TaskStatus, RandomState>>
Only return tasks with the given status.
include_labels: Option<Vec<LabelMatch, Global>>
Include only matching labels.
schedule_id: Option<Uuid>
Only return tasks for a given schedule.
search: Option<String>
A search text, how it is used is up to the store.
added_after: Option<OffsetDateTime>
Only include tasks added after the given timestamp (inclusive).
added_before: Option<OffsetDateTime>
Only include tasks added before the given timestamp (exclusive).
finished_after: Option<OffsetDateTime>
Only include tasks finished after the given timestamp (inclusive).
finished_before: Option<OffsetDateTime>
Only include tasks finished before the given timestamp (exclusive).
target_after: Option<OffsetDateTime>
Only include tasks with a target after the given timestamp (inclusive).
target_before: Option<OffsetDateTime>
Only include tasks with a target before the given timestamp (exclusive).
kind: Option<String>
Only return tasks with the provided worker selector kind.
order: TaskListOrder
The way tasks are ordered before applying offset and limit.
offset: u64
The task offset.
limit: u64
The maximum amount of tasks to fetch.
Implementations§
source§impl Tasks
impl Tasks
sourcepub fn all() -> Tasks
pub fn all() -> Tasks
Include all tasks without applying any filters nor limits.
caution: It does include ALL tasks without a limit.
sourcepub fn with_worker_selector(self, selector: WorkerSelector) -> Tasks
pub fn with_worker_selector(self, selector: WorkerSelector) -> Tasks
Only include tasks with a matching worker selector.
sourcepub fn with_label(self, label: &str) -> Tasks
pub fn with_label(self, label: &str) -> Tasks
Select tasks that contain the given label with any value.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Tasks
impl Send for Tasks
impl Sync for Tasks
impl Unpin for Tasks
impl UnwindSafe for Tasks
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<W> IntoHandler for Wwhere
W: Send + Sync + 'static,
impl<W> IntoHandler for Wwhere W: Send + Sync + 'static,
source§fn handler<T>(self) -> Arc<dyn RawHandler + Send + Sync>where
Self: Handler<T>,
T: Task,
fn handler<T>(self) -> Arc<dyn RawHandler + Send + Sync>where Self: Handler<T>, T: Task,
self
into a RawHandler
that can be registered
in workers.source§fn handler_with_selector<T>(
self,
selector: WorkerSelector
) -> Arc<dyn RawHandler + Send + Sync>where
Self: Handler<T>,
T: Task,
fn handler_with_selector<T>( self, selector: WorkerSelector ) -> Arc<dyn RawHandler + Send + Sync>where Self: Handler<T>, T: Task,
self
into a RawHandler
that can be registered
in workers with the given selector.