Skip to content

Should retries be automatic? #557

@mashirooooo

Description

@mashirooooo

when i use mysql backend, i found something is error;

 Monitor::new()
        .register({
            WorkerBuilder::new("auto_build_task")
                .enable_tracing()
                .backend(auto_build_storage.clone())
                .build_fn(auto_build_task)
        })
        .register({
            WorkerBuilder::new("check_auto_build_task")
                .enable_tracing()
                .backend(auto_build_check_storage.clone())
                .build_fn(check_auto_build_task)
        })
        .run()
        .await?;
async fn check_auto_build_task(req: CheckHandleAutoBuildTaskResult) -> Result<(), Error> {
    let result = handle_build_call_back(&req.data.auto_build_id, false).await;
    match result {
        Ok(_) => {
            log_serialize!("success", req);
            Ok(())
        }
        Err(e) => {
            log_serialize!("fail: {}", e);
            let err: BoxDynError = e.into();
            Err(err.into())
        }
    }
}

when i return Ok(()) or Err,they will retry 5 times, i dont konwn why ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions