rustvello 0.8.0

Distributed task queue and workflow runtime for Rust and Python: typed tasks, retries, priorities, triggers and pluggable backends
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use rustvello_core::error::RustvelloResult;
use rustvello_proto::identifiers::InvocationId;

use super::control_plane::RunnerControlPlane;

/// Claim the next invocation from this process's language and logical queues.
pub(crate) async fn claim_next(
    control_plane: &RunnerControlPlane,
) -> RustvelloResult<Option<InvocationId>> {
    control_plane
        .lifecycle()
        .claim_next(
            &control_plane.config,
            control_plane.task_registry(),
            control_plane.runner_language,
        )
        .await
}