apalis-postgres 1.0.0

Background task processing for rust using apalis and postgres
Documentation
use apalis_core::task::{status::StatusError, task_id::TaskIdError};
use sqlx::Error as SqlxError;
/// Represents a wrapper for errors encountered on this crate
#[derive(Debug, thiserror::Error)]
pub enum Error {
    /// Inner engine error
    #[error(transparent)]
    Database(#[from] SqlxError),
    /// Error handling json
    #[error("JsonError: {0}")]
    JsonError(serde_json::Error),
    /// Reenqueue Mismatch error
    #[error("ReenqueueMismatch: Queued [{queued}] , Abandoned[{abandoned}] ")]
    ReenqueueMismatch {
        /// The db count
        queued: usize,
        /// The workers count
        abandoned: usize,
    },
    /// Error decoding the task_id
    #[error("TaskId Error: {0}")]
    TaskIdError(TaskIdError),
    /// Error decoding the task status
    #[error("StatusError: {0}")]
    StatusError(StatusError),
    /// Worker was removed in the database
    #[error("WorkerOutOfSync")]
    WorkerOutOfSync,

    /// Tried to register a worker that already exists
    #[error("WorkerAlreadyExists: {0}")]
    WorkerAlreadyExists(String),

    #[error(
        "UpgradeRequired: Current version {current}, Required version {required}. \n Link: {link:?}"
    )]
    UpgradeRequired {
        /// The current version of the migrations in the database
        current: String,
        /// The required version of the migrations in the database
        required: String,
        /// Optional link to the migration guide
        link: Option<String>,
    },
}