Skip to main content

IAdapterLeaseWorkItem

Namespace: Meshmakers.Octo.Sdk.Common.Adapters

What the member actually does while it holds a lease (AB#4924, increment 6).

public interface IAdapterLeaseWorkItem

Remarks:

๐Ÿ”ด Deliberately a seam, not an implementation. The SDK cannot know what a member's work is: a mesh adapter runs a pipeline through its orchestrator, another adapter repo may run something else entirely. The adapter repo registers the implementation; the default below does nothing and says so, which is an honest "nothing to run" rather than a silently swallowed work item.

๐Ÿ”ด What the lease carries is what the work item runs (AB#4924 ยง9.9 / D4). LeaseDto names the pipeline, the input and the already existing execution entity the controller created at enqueue and moved to Running when it claimed it. An implementation must execute against that execution id and must not report an execution start for it โ€” the start-report path creates a second entity, and two entities for one piece of work means two billing spans and a queue history that no longer joins up.

Methodsโ€‹

RunAsync(LeaseDto, CancellationToken)โ€‹

Runs the work the lease was granted for. Called inside the lease scope, after every participant entered and before any of them leaves.

Task<LeaseWorkOutcome> RunAsync(LeaseDto lease, CancellationToken cancellationToken)

Parametersโ€‹

lease LeaseDto

cancellationToken CancellationToken

Returnsโ€‹

Task<LeaseWorkOutcome>