backie/src/blocking/fang_task_state.rs
Ayrat Badykov a9c4faa338
Update crates (#111)
* update `diesel-derive-enum` from `2.0.0-rc.0` to `2.0.1`

* add CHANGELOG entry
2023-02-23 09:33:24 +02:00

18 lines
585 B
Rust

/// Possible states of the task
#[derive(diesel_derive_enum::DbEnum, Debug, Eq, PartialEq, Clone)]
#[ExistingTypePath = "crate::schema::sql_types::FangTaskState"]
pub enum FangTaskState {
/// The task is ready to be executed
New,
/// The task is being executing.
///
/// The task may stay in this state forever
/// if an unexpected error happened
InProgress,
/// The task failed
Failed,
/// The task finished successfully
Finished,
/// The task is being retried. It means it failed but it's scheduled to be executed again
Retried,
}