Pārlūkot izejas kodu

add DefaultCronJobRegistry about Cap Job.

master
yangxiaodong pirms 7 gadiem
vecāks
revīzija
b5a0214ae5
1 mainītis faili ar 19 papildinājumiem un 0 dzēšanām
  1. +19
    -0
      src/Cap.Consistency/Job/CronJobRegistry.Default.cs

+ 19
- 0
src/Cap.Consistency/Job/CronJobRegistry.Default.cs Parādīt failu

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Text;
using Cap.Consistency.Infrastructure;
using Microsoft.Extensions.Options;

namespace Cap.Consistency.Job
{
public class DefaultCronJobRegistry : CronJobRegistry
{
private readonly ConsistencyOptions _options;

public DefaultCronJobRegistry(IOptions<ConsistencyOptions> options) {
_options = options.Value;

RegisterJob<CapJob>(nameof(DefaultCronJobRegistry), _options.CronExp, RetryBehavior.DefaultRetry);
}
}
}

Notiek ielāde…
Atcelt
Saglabāt