pub struct Store { /* private fields */ }Implementations§
Source§impl Store
impl Store
Sourcepub async fn new(database_url: &str) -> Result<Self>
pub async fn new(database_url: &str) -> Result<Self>
Create a new store and initialize the database
pub async fn save_dag(&self, dag: &DagDefinition) -> Result<()>
pub async fn get_dag(&self, dag_id: &str) -> Result<Option<DagDefinition>>
pub async fn get_all_dags(&self) -> Result<Vec<DagDefinition>>
pub async fn pause_dag(&self, dag_id: &str) -> Result<()>
pub async fn unpause_dag(&self, dag_id: &str) -> Result<()>
pub async fn is_dag_paused(&self, dag_id: &str) -> Result<bool>
Sourcepub async fn recover_orphaned_runs(&self) -> Result<()>
pub async fn recover_orphaned_runs(&self) -> Result<()>
Recover orphaned DAG and task runs from a previous crash Marks any Running tasks/runs as Failed with a system message
pub async fn create_dag_run( &self, dag_id: &str, triggered_by: TriggerType, ) -> Result<DagRun>
pub async fn get_dag_run(&self, run_id: &str) -> Result<Option<DagRun>>
pub async fn get_dag_runs( &self, dag_id: &str, limit: i64, ) -> Result<Vec<DagRun>>
pub async fn update_dag_run_status( &self, run_id: &str, status: DagRunStatus, ) -> Result<()>
pub async fn create_task_run( &self, dag_run_id: &str, task_id: &str, ) -> Result<TaskRun>
pub async fn get_task_run(&self, task_run_id: &str) -> Result<Option<TaskRun>>
pub async fn get_task_runs_for_dag_run( &self, dag_run_id: &str, ) -> Result<Vec<TaskRun>>
pub async fn update_task_run( &self, task_run_id: &str, status: TaskRunStatus, log_append: Option<&str>, xcom_output: Option<String>, ) -> Result<()>
pub async fn increment_task_run_attempt(&self, task_run_id: &str) -> Result<u32>
pub async fn append_task_log( &self, task_run_id: &str, log_line: &str, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for Store
impl !RefUnwindSafe for Store
impl Send for Store
impl Sync for Store
impl Unpin for Store
impl UnsafeUnpin for Store
impl !UnwindSafe for Store
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
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