Table of Contents

Class JobExecutor

Namespace
Millrace.Invocations
Assembly
Millrace.dll

Executes a claimed job: resolves the declared service type from a fresh DI scope, restores the job's tenant into the ambient context, deserializes arguments, and invokes the method with the job's execution token injected at CancellationToken positions.

public sealed class JobExecutor
Inheritance
JobExecutor
Inherited Members

Constructors

JobExecutor(IServiceScopeFactory, ITenantContextAccessor, IOptions<MillraceOptions>)

Executes a claimed job: resolves the declared service type from a fresh DI scope, restores the job's tenant into the ambient context, deserializes arguments, and invokes the method with the job's execution token injected at CancellationToken positions.

Methods

ExecuteAsync(JobRecord, CancellationToken)

Runs the job and returns the effects it asked to have committed with its own completion.