xecute-cli 0.1.21

Project and resource scaffolding for Axum applications with Xecute tools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Serializable payload and handler for the __FEATURE__ worker.

use serde::{Deserialize, Serialize};
use xecute::jobs::{JobContext, JobError};

/// Payload submitted to the __FEATURE__ background queue.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct __TYPE__Job {
    /// Application record identifier this job should process.
    pub record_id: u64,
}

/// Process one __FEATURE__ job.
pub(crate) async fn handle(job: JobContext<__TYPE__Job>) -> Result<(), JobError> {
    let _ = (job.id, job.attempt, job.payload.record_id);
    Ok(())
}