Table of Contents

Class JobBatch

Namespace
Millrace
Assembly
Millrace.dll

Jobs to enqueue together, in one round trip and one transaction.

public sealed class JobBatch
Inheritance
JobBatch
Inherited Members

Remarks

Fan-out over a thousand items is a thousand round trips with EnqueueAsync<T>(Expression<Func<T, Task>>, EnqueueOptions?, CancellationToken). The storage contract has always inserted all-or-nothing (§4.2); this is the client surface that reaches it.

All-or-nothing is the point, not a side effect. A partially-enqueued fan-out is worse than none: the caller cannot tell which half landed, and retrying duplicates the rest unless every item carries an idempotency key.

Properties

Count

How many jobs the batch will insert.

Methods

Enqueue<T>(Expression<Func<T, Task>>, EnqueueOptions?)

Adds a fire-and-forget job.

Schedule<T>(Expression<Func<T, Task>>, DateTimeOffset, EnqueueOptions?)

Adds a job that becomes claimable at at.

Schedule<T>(Expression<Func<T, Task>>, TimeSpan, EnqueueOptions?)

Adds a job that becomes claimable after delay.