pub struct PostgresBackend { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Backend for PostgresBackend
impl Backend for PostgresBackend
Source§async fn add_job_types(&self, job_types: &[JobType]) -> Result<(), Error>
async fn add_job_types(&self, job_types: &[JobType]) -> Result<(), Error>
Add or update job types.
Source§async fn add_jobs(
&self,
jobs: &[NewJob],
if_not_exists: Option<JobFilters>,
) -> Result<Vec<JobId>, Error>
async fn add_jobs( &self, jobs: &[NewJob], if_not_exists: Option<JobFilters>, ) -> Result<Vec<JobId>, Error>
Add new jobs and return their IDs in the same order. Read more
Source§async fn list_jobs(
&self,
filters: JobFilters,
order_by: Option<JobOrderBy>,
page_size: u32,
page_token: Option<NextPageToken>,
) -> Result<(Vec<JobDetails>, Option<NextPageToken>), Error>
async fn list_jobs( &self, filters: JobFilters, order_by: Option<JobOrderBy>, page_size: u32, page_token: Option<NextPageToken>, ) -> Result<(Vec<JobDetails>, Option<NextPageToken>), Error>
List jobs matching the given filters.
Source§async fn count_jobs(&self, filters: JobFilters) -> Result<u64, Error>
async fn count_jobs(&self, filters: JobFilters) -> Result<u64, Error>
Count the jobs matching the given filters.
Source§async fn cancel_jobs(
&self,
filters: JobFilters,
) -> Result<Vec<CancelledJob>, Error>
async fn cancel_jobs( &self, filters: JobFilters, ) -> Result<Vec<CancelledJob>, Error>
Cancel the jobs matching the given filters, returning
the cancelled jobs.
Source§async fn add_schedules(
&self,
schedules: &[ScheduleDefinition],
if_not_exists: Option<ScheduleFilters>,
) -> Result<Vec<ScheduleId>, Error>
async fn add_schedules( &self, schedules: &[ScheduleDefinition], if_not_exists: Option<ScheduleFilters>, ) -> Result<Vec<ScheduleId>, Error>
Add new schedules and return their IDs in the same order. Read more
Source§async fn list_schedules(
&self,
filters: ScheduleFilters,
order_by: Option<ScheduleOrderBy>,
page_size: u32,
page_token: Option<NextPageToken>,
) -> Result<(Vec<ScheduleDetails>, Option<NextPageToken>), Error>
async fn list_schedules( &self, filters: ScheduleFilters, order_by: Option<ScheduleOrderBy>, page_size: u32, page_token: Option<NextPageToken>, ) -> Result<(Vec<ScheduleDetails>, Option<NextPageToken>), Error>
List schedules matching the given filters.
Source§async fn count_schedules(&self, filters: ScheduleFilters) -> Result<u64, Error>
async fn count_schedules(&self, filters: ScheduleFilters) -> Result<u64, Error>
Count the schedules matching the given filters.
Source§async fn stop_schedules(
&self,
filters: ScheduleFilters,
) -> Result<Vec<StoppedSchedule>, Error>
async fn stop_schedules( &self, filters: ScheduleFilters, ) -> Result<Vec<StoppedSchedule>, Error>
Stop the schedules matching the given filters, returning
the IDs of the stopped schedules.
Source§fn ready_executions(
&self,
) -> impl Stream<Item = Result<Vec<ReadyExecution>, Error>> + Send
fn ready_executions( &self, ) -> impl Stream<Item = Result<Vec<ReadyExecution>, Error>> + Send
Return ready executions. Read more
Source§async fn wait_for_ready_executions(&self) -> Result<(), Error>
async fn wait_for_ready_executions(&self) -> Result<(), Error>
Wait for executions to be ready.
Source§fn in_progress_executions(
&self,
) -> impl Stream<Item = Result<Vec<InProgressExecution>, Error>> + Send
fn in_progress_executions( &self, ) -> impl Stream<Item = Result<Vec<InProgressExecution>, Error>> + Send
Return a stream of in-progress executions. Read more
Source§async fn executions_started(
&self,
executions: &[StartedExecution],
) -> Result<(), Error>
async fn executions_started( &self, executions: &[StartedExecution], ) -> Result<(), Error>
The given executions have started. Read more
Source§async fn executions_succeeded(
&self,
executions: &[SucceededExecution],
) -> Result<(), Error>
async fn executions_succeeded( &self, executions: &[SucceededExecution], ) -> Result<(), Error>
The given executions have successfully completed.
Source§async fn executions_failed(
&self,
executions: &[FailedExecution],
) -> Result<(), Error>
async fn executions_failed( &self, executions: &[FailedExecution], ) -> Result<(), Error>
The given executions have failed.
Source§async fn executions_retried(
&self,
executions: &[FailedExecution],
) -> Result<(), Error>
async fn executions_retried( &self, executions: &[FailedExecution], ) -> Result<(), Error>
The given executions have failed but need to be retried. Read more
Source§fn pending_schedules(
&self,
) -> impl Stream<Item = Result<Vec<PendingSchedule>, Error>> + Send
fn pending_schedules( &self, ) -> impl Stream<Item = Result<Vec<PendingSchedule>, Error>> + Send
Return a stream of active schedules that do not have
an active job.
Source§async fn delete_history(&self, before: SystemTime) -> Result<(), Error>
async fn delete_history(&self, before: SystemTime) -> Result<(), Error>
Delete historical data for inactive jobs and schedules. Read more
Auto Trait Implementations§
impl Freeze for PostgresBackend
impl !RefUnwindSafe for PostgresBackend
impl Send for PostgresBackend
impl Sync for PostgresBackend
impl Unpin for PostgresBackend
impl !UnwindSafe for PostgresBackend
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