IDurableJobHandler
interface
Namespace: Orleans.DurableJobs
Defines the interface for handling durable job execution. Grains implement this interface to receive and process durable jobs.
public interface IDurableJobHandlerRemarks
Grains that implement this interface can be targeted by durable jobs. The IDurableJobHandler method is invoked when the job's due time is reached.
IDurableJobHandler: public class MyGrain : Grain, IDurableJobHandler{ public Task ExecuteJobAsync(IJobRunContext context, CancellationToken cancellationToken) { // Process the durable job var jobName = context.Job.Name; var dueTime = context.Job.DueTime;
// Perform job logic here
return Task.CompletedTask; }}Methods
ExecuteJobAsync(IJobRunContext, CancellationToken)Executes the durable job with the provided context.
