public static JobsOptions UseSqlServer(this JobsOptions options, string connectionString) { return(options.UseSqlServer(opts => { opts.ConnectionString = connectionString; })); }
public BootstrapperBase( JobsOptions options, IStorage storage, IProcessingServer server) { Options = options; Storage = storage; Server = server; }
public SqlServerBootstrapper( JobsOptions options, IStorage storage, IProcessingServer server, IApplicationLifetime appLifetime) : base(options, storage, server) { _appLifetime = appLifetime; }
public JobsManager( JobsOptions options, IStorage storage, IProcessingServer server) { _options = options; _storage = storage; _server = server; }
public static JobsOptions UseSqlServer(this JobsOptions options, Action <SqlServerOptions> configure) { if (configure == null) { throw new ArgumentNullException(nameof(configure)); } options.RegisterExtension(new SqlServerJobsOptionsExtension(configure)); return(options); }
public static void AddJobs( this IServiceCollection services, Action <JobsOptions> configure) { services.AddSingleton <IJobsManager, JobsManager>(); services.AddSingleton <IJobFactory, JobFactory>(); services.AddSingleton <IProcessingServer, ProcessingServer>(); // Processors services.AddTransient <FireAndForgetJobProcessor>(); services.AddTransient <DelayedJobProcessor>(); services.AddTransient <CronJobProcessor>(); var options = new JobsOptions(); configure(options); options.Extension?.AddServices(services); services.AddSingleton(options); }