pub struct PostgresSchedulerStore { /* private fields */ }Expand description
PostgreSQL-backed scheduler store.
Shared durable storage for Mode 2 coordinator–worker clusters (and Mode 1 when you already
run Postgres). Pass a connection URL to Self::connect; daemons often use
CHRONON_POSTGRES_URL / postgres_test_url.
Mode 2 examples: coordinator / worker.
For higher claim throughput, wrap with PostgresRedisSchedulerStore from
chronon-backend-redis (postgres + redis features). Enable the facade postgres
feature to re-export this type.
§Examples
use chronon_backend_postgres::PostgresSchedulerStore;
let store = PostgresSchedulerStore::connect(
"postgres://user:pass@localhost/chronon",
)
.await?;Runnable: cargo run -p uf-chronon --example postgres_boot --features postgres.
Implementations§
Source§impl PostgresSchedulerStore
impl PostgresSchedulerStore
Sourcepub async fn connect(url: &str) -> Result<PostgresSchedulerStore, ChrononError>
pub async fn connect(url: &str) -> Result<PostgresSchedulerStore, ChrononError>
Sourcepub async fn connect_isolated(
url: &str,
schema: &str,
) -> Result<PostgresSchedulerStore, ChrononError>
pub async fn connect_isolated( url: &str, schema: &str, ) -> Result<PostgresSchedulerStore, ChrononError>
Connect with an isolated schema (for parallel tests).
§Examples
use chronon_backend_postgres::PostgresSchedulerStore;
let store = PostgresSchedulerStore::connect_isolated(
"postgres://user:pass@localhost/chronon",
"chronon_test_schema",
)
.await?;§Errors
Returns a storage error when schema creation, pool connect, or bootstrap fails.
Sourcepub async fn attach_isolated(
url: &str,
schema: &str,
) -> Result<PostgresSchedulerStore, ChrononError>
pub async fn attach_isolated( url: &str, schema: &str, ) -> Result<PostgresSchedulerStore, ChrononError>
Attach to an existing isolated schema (no DDL bootstrap; for multi-process workers).
§Errors
Returns a storage error when the pool cannot be opened.
Sourcepub async fn drop_isolated_schema(
url: &str,
schema: &str,
) -> Result<(), ChrononError>
pub async fn drop_isolated_schema( url: &str, schema: &str, ) -> Result<(), ChrononError>
Drop an isolated bench/test schema (multibench cell reset).
§Errors
Returns a storage error when the admin connection or DDL fails.
Sourcepub async fn from_pool(
pool: Pool<Postgres>,
) -> Result<PostgresSchedulerStore, ChrononError>
pub async fn from_pool( pool: Pool<Postgres>, ) -> Result<PostgresSchedulerStore, ChrononError>
Wrap an existing pool (schema bootstrap runs).
§Examples
use chronon_backend_postgres::PostgresSchedulerStore;
use sqlx::postgres::PgPoolOptions;
let pool = PgPoolOptions::new()
.connect("postgres://localhost/chronon")
.await
.expect("pool");
let store = PostgresSchedulerStore::from_pool(pool).await?;§Errors
Returns a storage error when schema bootstrap fails.
Trait Implementations§
Source§impl Debug for PostgresSchedulerStore
impl Debug for PostgresSchedulerStore
Source§impl SchedulerStore for PostgresSchedulerStore
impl SchedulerStore for PostgresSchedulerStore
Source§fn upsert_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job: &'life1 Job,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn upsert_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job: &'life1 Job,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Job::job_id. Read moreSource§fn get_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn get_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn get_job_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
job_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn get_job_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
job_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Job::job_name.Source§fn list_jobs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn list_jobs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn list_due_jobs<'life0, 'async_trait>(
&'life0 self,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn list_due_jobs<'life0, 'async_trait>(
&'life0 self,
before: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
next_run_at <= before and enabled scheduling (tick discovery). Read moreSource§fn pause_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn pause_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn resume_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn resume_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Self::pause_job.Source§fn create_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 Run,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn create_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 Run,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
RunStatus::Queued). Read moreSource§fn update_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 Run,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn update_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run: &'life1 Run,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn get_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn get_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Run::run_id.Source§fn list_runs_for_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn list_runs_for_job<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
limit.Source§fn list_runs_filtered<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Option<&'life1 str>,
status: Option<RunStatus>,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn list_runs_filtered<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: Option<&'life1 str>,
status: Option<RunStatus>,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn claim_next_queued<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
pool_id: &'life1 str,
worker_id: &'life2 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn claim_next_queued<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
pool_id: &'life1 str,
worker_id: &'life2 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn claim_run_by_id<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
pool_id: &'life2 str,
worker_id: &'life3 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn claim_run_by_id<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
pool_id: &'life2 str,
worker_id: &'life3 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Option<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn claim_runs_by_ids<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
run_ids: &'life1 [&'life2 str],
pool_id: &'life3 str,
worker_id: &'life4 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn claim_runs_by_ids<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
run_ids: &'life1 [&'life2 str],
pool_id: &'life3 str,
worker_id: &'life4 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Run>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn renew_run_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
worker_id: &'life2 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn renew_run_lease<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
worker_id: &'life2 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
worker_id still holds the claim. Read moreSource§fn append_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
revision: &'life1 JobRevision,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn append_revision<'life0, 'life1, 'async_trait>(
&'life0 self,
revision: &'life1 JobRevision,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn list_revisions<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobRevision>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn list_revisions<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<JobRevision>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn upsert_script<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 Script,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn upsert_script<'life0, 'life1, 'async_trait>(
&'life0 self,
script: &'life1 Script,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn get_script<'life0, 'life1, 'async_trait>(
&'life0 self,
script_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Script>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn get_script<'life0, 'life1, 'async_trait>(
&'life0 self,
script_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Script>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn try_claim_run_once<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
claimed_by: &'life2 str,
now: DateTime<Utc>,
claim_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn try_claim_run_once<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
claimed_by: &'life2 str,
now: DateTime<Utc>,
claim_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn mark_run_once_completed<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
completed_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn mark_run_once_completed<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
completed_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn release_run_once_claim<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
claimed_by: &'life2 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn release_run_once_claim<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
claimed_by: &'life2 str,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn find_due_job_ids_in_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
owned_partitions: &'life1 [u32],
due_until: DateTime<Utc>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn find_due_job_ids_in_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
owned_partitions: &'life1 [u32],
due_until: DateTime<Utc>,
limit: u32,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn min_next_run_at_in_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
owned_partitions: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<Option<DateTime<Utc>>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn min_next_run_at_in_partitions<'life0, 'life1, 'async_trait>(
&'life0 self,
owned_partitions: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<Option<DateTime<Utc>>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
next_run_at among jobs in the owned partitions (sleep hint for tick loop).Source§fn claim_job_for_tick<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
claim_id: &'life2 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn claim_job_for_tick<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
claim_id: &'life2 str,
now: DateTime<Utc>,
lease_ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn release_job_tick_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn release_job_tick_claim<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn persist_post_tick_job_state<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
next_run_at: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn persist_post_tick_job_state<'life0, 'life1, 'async_trait>(
&'life0 self,
job_id: &'life1 str,
next_run_at: Option<DateTime<Utc>>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
next_run_at (and related job fields) after a successful tick.Source§fn try_acquire_leader<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn try_acquire_leader<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<bool, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn renew_leader_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn renew_leader_lease<'life0, 'life1, 'async_trait>(
&'life0 self,
instance_id: &'life1 str,
ttl_secs: i64,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn get_leader<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<SchedulerLeader>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn get_leader<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Option<SchedulerLeader>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn upsert_partition_assignment<'life0, 'life1, 'async_trait>(
&'life0 self,
assignment: &'life1 PartitionAssignment,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn upsert_partition_assignment<'life0, 'life1, 'async_trait>(
&'life0 self,
assignment: &'life1 PartitionAssignment,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn list_partition_assignments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PartitionAssignment>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn list_partition_assignments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PartitionAssignment>, ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn register_worker<'life0, 'life1, 'async_trait>(
&'life0 self,
worker: &'life1 Worker,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn register_worker<'life0, 'life1, 'async_trait>(
&'life0 self,
worker: &'life1 Worker,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
Source§fn heartbeat_worker<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: &'life1 str,
at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
fn heartbeat_worker<'life0, 'life1, 'async_trait>(
&'life0 self,
worker_id: &'life1 str,
at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), ChrononError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
PostgresSchedulerStore: 'async_trait,
last_heartbeat_at for an existing worker.Auto Trait Implementations§
impl !RefUnwindSafe for PostgresSchedulerStore
impl !UnwindSafe for PostgresSchedulerStore
impl Freeze for PostgresSchedulerStore
impl Send for PostgresSchedulerStore
impl Sync for PostgresSchedulerStore
impl Unpin for PostgresSchedulerStore
impl UnsafeUnpin for PostgresSchedulerStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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