Class JobClient
- Namespace
- Millrace
- Assembly
- Millrace.dll
Default IJobClient: captures expressions into records and hands them to storage.
public sealed class JobClient : IJobClient
- Inheritance
-
JobClient
- Implements
- Inherited Members
Constructors
- JobClient(IJobStorage, ITenantContextAccessor, TimeProvider, IOptions<MillraceOptions>)
Default IJobClient: captures expressions into records and hands them to storage.
Methods
- CancelAsync(JobId, CancellationToken)
Cancels a job, returning whether anything was cancelled.
- ContinueWithAsync<T>(JobId, Expression<Func<T, Task>>, EnqueueOptions?, CancellationToken)
Runs after the parent job succeeds; cancelled (transitively) if the parent dies or is cancelled.
- EnqueueAsync<T>(Expression<Func<T, Task>>, EnqueueOptions?, CancellationToken)
Fire-and-forget: claimable immediately.
- EnqueueBatchAsync(JobBatch, CancellationToken)
Enqueues a batch in one round trip and one transaction, returning the effective ids positionally.
- RemoveRecurringAsync(string, CancellationToken)
Removes a cron definition, so it produces no further occurrences.
- RequeueAsync(JobId, CancellationToken)
Runs a finished job again, as a new job carrying a link back to it. Returns the new id, or null if
iddoes not exist.
- RunNowAsync(JobId, CancellationToken)
Runs a job that is waiting out its retry backoff now, returning whether anything changed.
- ScheduleAsync<T>(Expression<Func<T, Task>>, DateTimeOffset, EnqueueOptions?, CancellationToken)
Runs at
at(UTC).
- ScheduleAsync<T>(Expression<Func<T, Task>>, TimeSpan, EnqueueOptions?, CancellationToken)
Runs after
delay.
- TriggerRecurringAsync(string, CancellationToken)
Fires a recurring definition immediately, without disturbing its schedule.
- UpsertRecurringAsync<T>(string, string, Expression<Func<T, Task>>, EnqueueOptions?, CancellationToken)
Creates or updates a cron definition (five-field vixie syntax, UTC). The recurring id is the definition's identity; IdempotencyKey is not supported here in 0.1 and throws.