public ProjectorServices(ICacheAdapter cache, IMessageBusAdapter bus, ILockProvider lockProvider, IServiceProvider serviceProvider) { Cache = cache ?? throw new ArgumentNullException(nameof(cache)); Bus = bus ?? throw new ArgumentNullException(nameof(bus)); LockProvider = lockProvider ?? throw new ArgumentNullException(nameof(lockProvider)); ServiceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); }
public OrganizationNotificationWorkItemHandler(IOrganizationRepository organizationRepository, IUserRepository userRepository, IMailer mailer, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _organizationRepository = organizationRepository; _userRepository = userRepository; _mailer = mailer; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromHours(1)); }
public CryptoKeyProviderFactory(IConfigurationProvider config, IKmsClientFactory kmsClientFactory, ICryptoKeyStore cryptoKeyStore, ILockProvider lockProvider) { _config = config; _cryptoKeyStore = cryptoKeyStore; _lockProvider = lockProvider; _kmsClientFactory = kmsClientFactory; }
public override async Task InitializeAsync() { await base.InitializeAsync(); _migrationIndex = new MigrationIndex(_configuration); await _migrationIndex.DeleteAsync(); await _migrationIndex.ConfigureAsync(); var cacheClient = new InMemoryCacheClient(); var messageBus = new InMemoryMessageBus(); _lockProvider = new CacheLockProvider(cacheClient, messageBus, Log); _migrationStateRepository = new MigrationStateRepository(_migrationIndex); var serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton <VersionedWithoutVersionMigration>(); serviceCollection.AddSingleton <Version1Migration>(); serviceCollection.AddSingleton <Version2Migration>(); serviceCollection.AddSingleton <Version3Migration>(); serviceCollection.AddSingleton <FailingMigration>(); serviceCollection.AddSingleton <FailingResumableMigration>(); serviceCollection.AddSingleton <RepeatableMigration>(); _serviceProvider = serviceCollection.BuildServiceProvider(); _migrationManager = new MigrationManager(_serviceProvider, _migrationStateRepository, _lockProvider, Log); }
public CleanupDataJob( IOrganizationRepository organizationRepository, OrganizationService organizationService, IProjectRepository projectRepository, IStackRepository stackRepository, IEventRepository eventRepository, ITokenRepository tokenRepository, IWebHookRepository webHookRepository, ICacheClient cacheClient, BillingManager billingManager, AppOptions appOptions, ILoggerFactory loggerFactory = null ) : base(loggerFactory) { _organizationRepository = organizationRepository; _organizationService = organizationService; _projectRepository = projectRepository; _stackRepository = stackRepository; _eventRepository = eventRepository; _tokenRepository = tokenRepository; _webHookRepository = webHookRepository; _billingManager = billingManager; _appOptions = appOptions; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromDays(1)); }
public ScheduledJobRunner(Func <IJob> jobFactory, string schedule, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) { _jobFactory = jobFactory; Schedule = schedule; _logger = loggerFactory?.CreateLogger <ScheduledJobRunner>() ?? NullLogger <ScheduledJobRunner> .Instance; _cronSchedule = CronExpression.Parse(schedule); if (_cronSchedule == null) { throw new ArgumentException("Could not parse schedule.", nameof(schedule)); } var interval = TimeSpan.FromDays(1); var nextOccurrence = _cronSchedule.GetNextOccurrence(SystemClock.UtcNow); if (nextOccurrence.HasValue) { var nextNextOccurrence = _cronSchedule.GetNextOccurrence(nextOccurrence.Value); if (nextNextOccurrence.HasValue) { interval = nextNextOccurrence.Value.Subtract(nextOccurrence.Value); } } _lockProvider = new ThrottlingLockProvider(cacheClient, 1, interval.Add(interval)); NextRun = _cronSchedule.GetNextOccurrence(SystemClock.UtcNow); }
public static Task <bool> TryUsingAsync(this ILockProvider locker, string name, Action work, TimeSpan?lockTimeout = null, TimeSpan?acquireTimeout = null) { return(locker.TryUsingAsync(name, () => { work(); return Task.CompletedTask; }, lockTimeout, acquireTimeout)); }
public CleanupDataJob( IOrganizationRepository organizationRepository, OrganizationService organizationService, IProjectRepository projectRepository, IStackRepository stackRepository, IEventRepository eventRepository, ITokenRepository tokenRepository, IWebHookRepository webHookRepository, IElasticClient elasticClient, ILockProvider lockProvider, BillingManager billingManager, AppOptions appOptions, ILoggerFactory loggerFactory = null ) : base(loggerFactory) { _organizationRepository = organizationRepository; _organizationService = organizationService; _projectRepository = projectRepository; _stackRepository = stackRepository; _eventRepository = eventRepository; _tokenRepository = tokenRepository; _webHookRepository = webHookRepository; _billingManager = billingManager; _appOptions = appOptions; _lockProvider = lockProvider; }
public static async Task TestLock(ILockProvider lockProvider) { var keys = new string[] { "BBFCC95A-2FA1-45DA-A289-FF486C33AFC9", "56FCC95A-2FA1-45DA-A289-FF486C33AFC8" }; var data = new Dictionary <string, List <int> >(keys.Select(x => new KeyValuePair <string, List <int> >(x, new List <int>()))); Random ran = new Random(); await Task.WhenAll(Enumerable.Range(0, 4).Select(async i => { var key = keys[i % keys.Length]; using (var @lock = await lockProvider.GetLock(key)) { await Task.Delay(ran.Next(100, 300)); for (int n = 0; n < 10; n++) { data[key].Add(10 * i + n); } } })); foreach (var kv in data) { var sorted = kv.Value.OrderBy(x => x).ToList(); Assert.Equal(sorted, kv.Value); } }
public SetLocationFromGeoWorkItemHandler(ICacheClient cacheClient, IEventRepository eventRepository, IGeocodeService geocodeService, IMetricsClient metricsClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _cacheClient = new ScopedCacheClient(cacheClient, "geo"); _eventRepository = eventRepository; _geocodeService = geocodeService; _metricsClient = metricsClient; _lockProvider = new CacheLockProvider(cacheClient, messageBus); }
public DisposableLock(string name, ILockProvider lockProvider, ILogger logger) { _duration = Stopwatch.StartNew(); _logger = logger; _name = name; _lockProvider = lockProvider; }
public CleanupSnapshotJob(ExceptionlessElasticConfiguration configuration, ILockProvider lockProvider, ILoggerFactory loggerFactory) : base(configuration.Client, lockProvider, loggerFactory) { AddRepository(Settings.Current.AppScopePrefix + "ex_organizations", TimeSpan.FromDays(7)); AddRepository(Settings.Current.AppScopePrefix + "ex_stacks", TimeSpan.FromDays(7)); AddRepository(Settings.Current.AppScopePrefix + "ex_events", TimeSpan.FromDays(7)); }
public static Task <bool> TryUsingAsync(this ILockProvider locker, IEnumerable <string> resources, Action work, TimeSpan?timeUntilExpires, TimeSpan?acquireTimeout) { return(locker.TryUsingAsync(resources, () => { work(); return Task.CompletedTask; }, timeUntilExpires, acquireTimeout)); }
public AssignToStackAction(IStackRepository stackRepository, FormattingPluginManager formattingPluginManager, IMessagePublisher publisher, AppOptions options, ILockProvider lockProvider, ILoggerFactory loggerFactory = null) : base(options, loggerFactory) { _stackRepository = stackRepository ?? throw new ArgumentNullException(nameof(stackRepository)); _formattingPluginManager = formattingPluginManager ?? throw new ArgumentNullException(nameof(formattingPluginManager)); _publisher = publisher; _lockProvider = lockProvider; }
public ScheduledJobRunner(Func <IJob> jobFactory, string schedule, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) { _jobFactory = jobFactory; Schedule = schedule; _logger = loggerFactory?.CreateLogger <ScheduledJobRunner>() ?? NullLogger <ScheduledJobRunner> .Instance; _runner = new JobRunner(jobFactory, loggerFactory, runContinuous: false); _cronSchedule = CrontabSchedule.TryParse(schedule, s => s, e => { var ex = e(); if (_logger.IsEnabled(LogLevel.Error)) { _logger.LogError(ex, "Error parsing schedule {Schedule}: {Message}", schedule, ex.Message); } return(null); }); if (_cronSchedule == null) { throw new ArgumentException("Could not parse schedule.", nameof(schedule)); } var dates = _cronSchedule.GetNextOccurrences(SystemClock.UtcNow, DateTime.MaxValue).Take(2).ToList(); var interval = TimeSpan.FromDays(1); if (dates.Count == 2) { interval = dates[1].Subtract(dates[0]); } _lockProvider = new ThrottlingLockProvider(cacheClient, 1, interval.Add(interval)); }
public RuleQueryExecuter(IRepository repository, IRuleExecutionElementFactory <TDocumentType> ruleExecutionElementFactory, [Dependency("MultipleStopwatchCache")] ICache <Tuple <string, string, string, string>, IEnumerable <IRuleExecutionElement <TDocumentType> > > rulesCache, ILockProvider lockProvider) { _repository = repository; _ruleExecutionElementFactory = ruleExecutionElementFactory; _rulesCache = rulesCache; _lockProvider = lockProvider; }
public RetentionLimitsJob(IOrganizationRepository organizationRepository, IEventRepository eventRepository, ICacheClient cacheClient, AppOptions appOptions, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _organizationRepository = organizationRepository; _eventRepository = eventRepository; _appOptions = appOptions; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromDays(1)); }
public KmsCryptoKeyProvider(IConfigurationProvider config, IKmsClientFactory kmsClientFactory, ICryptoKeyStore cryptoKeyStore, ILockProvider lockProvider) { _config = config; _cryptoKeyStore = cryptoKeyStore; _lockProvider = lockProvider; _kmsClientFactory = kmsClientFactory; _globalLock = new GlobalLock(lockProvider); }
public WebFarmConfiguration(IInstanceDataStore instanceConfigurationStore, ILockProvider lockProvider, IConfigurationProvider configurationProvider) { _instanceConfigurationStore = instanceConfigurationStore; _heartBeatSettings = configurationProvider.GetGlobalConfigurationAsNameValueCollection(_monotoneIdGenerator, _webfarmSettings, _heartbeatSettings) ?? new NameValueCollection(); _globalLock = new GlobalLock(lockProvider); _configurationProvider = configurationProvider; }
public SagaServices(IMessageBusAdapter bus, IRepository repository, ILockProvider lockProvider, IPersistentSubscriptionFactory persistentSubscriptionFactory, IServiceProvider serviceProvider) { Bus = bus ?? throw new ArgumentNullException(nameof(bus)); Repository = repository ?? throw new ArgumentNullException(nameof(repository)); LockProvider = lockProvider ?? throw new ArgumentNullException(nameof(lockProvider)); PersistentSubscriptionFactory = persistentSubscriptionFactory ?? throw new ArgumentNullException(nameof(persistentSubscriptionFactory)); ServiceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider)); }
public WithLockingJob(ILoggerFactory loggerFactory) : base(loggerFactory) { _locker = new CacheLockProvider(new InMemoryCacheClient(new InMemoryCacheClientOptions { LoggerFactory = loggerFactory }), new InMemoryMessageBus(new InMemoryMessageBusOptions { LoggerFactory = loggerFactory }), loggerFactory); }
public MigrationManager(IServiceProvider serviceProvider, IMigrationStateRepository migrationStatusRepository, ILockProvider lockProvider, ILoggerFactory loggerFactory) { _serviceProvider = serviceProvider; _migrationStatusRepository = migrationStatusRepository; _lockProvider = lockProvider; _loggerFactory = loggerFactory ?? NullLoggerFactory.Instance; _logger = _loggerFactory.CreateLogger <MigrationManager>(); }
public static void TryUsingLock(this ILockProvider locker, string name, Action work, TimeSpan?lockTimeout = null, TimeSpan?acquireTimeout = null) { try { using (locker.AcquireLock(name, lockTimeout, acquireTimeout)) work(); } catch (TimeoutException) {} }
public RemoveProjectWorkItemHandler(IProjectRepository projectRepository, IEventRepository eventRepository, IStackRepository stackRepository, ITokenRepository tokenRepository, IWebHookRepository webHookRepository, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _projectRepository = projectRepository; _eventRepository = eventRepository; _stackRepository = stackRepository; _tokenRepository = tokenRepository; _webHookRepository = webHookRepository; _lockProvider = new CacheLockProvider(cacheClient, messageBus); }
public IndexBase(IElasticConfiguration configuration, string name) { Name = name; Configuration = configuration; _lockProvider = new CacheLockProvider(configuration.Cache, configuration.MessageBus, configuration.LoggerFactory); _logger = configuration.LoggerFactory.CreateLogger(GetType()); _frozenTypes = new Lazy <IReadOnlyCollection <IIndexType> >(() => _types.AsReadOnly()); }
public ScopedLockProvider(ILockProvider lockProvider, string scope = null) { UnscopedLockProvider = lockProvider; _isLocked = scope != null; Scope = !String.IsNullOrWhiteSpace(scope) ? scope.Trim() : null; _keyPrefix = Scope != null?String.Concat(Scope, ":") : String.Empty; }
public CleanupSnapshotJob(ExceptionlessElasticConfiguration configuration, ILockProvider lockProvider, ILoggerFactory loggerFactory) : base(configuration.Client, lockProvider, loggerFactory) { _configuration = configuration; AddRepository(configuration.Options.ScopePrefix + "organizations", TimeSpan.FromDays(7)); AddRepository(configuration.Options.ScopePrefix + "stacks", TimeSpan.FromDays(7)); AddRepository(configuration.Options.ScopePrefix + "events", TimeSpan.FromDays(7)); }
public DailySummaryJob(IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IEventRepository eventRepository, EventStats stats, IMailer mailer, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _projectRepository = projectRepository; _organizationRepository = organizationRepository; _userRepository = userRepository; _eventRepository = eventRepository; _stats = stats; _mailer = mailer; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromHours(1)); }
public static void Ctor_Throws_WhenProviderParameterIsNull() { ILockProvider provider = null; const string resource = "resource"; TimeSpan timeout = default; Assert.Throws <ArgumentNullException>(nameof(provider), () => new EFCoreLock(provider, resource, timeout)); }
public CleanupOrphanedDataJob(ExceptionlessElasticConfiguration config, IStackRepository stackRepository, IEventRepository eventRepository, ICacheClient cacheClient, ILockProvider lockProvider, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _config = config; _elasticClient = config.Client; _stackRepository = stackRepository; _eventRepository = eventRepository; _cacheClient = cacheClient; _lockProvider = lockProvider; }
public DailySummaryJob(IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IStackRepository stackRepository, IEventRepository eventRepository, EventStats stats, IMailer mailer, ILockProvider lockProvider) { _projectRepository = projectRepository; _organizationRepository = organizationRepository; _userRepository = userRepository; _stackRepository = stackRepository; _eventRepository = eventRepository; _stats = stats; _mailer = mailer; _lockProvider = lockProvider; }
public MigrationJobBase(IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, EventIndex eventIndex, StackIndex stackIndex, IValidator<Stack> stackValidator, IValidator<PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) { _eventUpgraderPluginManager = eventUpgraderPluginManager; _mongoDatabase = GetMongoDatabase(); _eventRepository = new EventMigrationRepository(elasticClient, eventIndex, eventValidator); _stackRepository = new StackMigrationRepository(elasticClient, stackIndex, _eventRepository, stackValidator); _geoIpResolver = geoIpResolver; _lockProvider = lockProvider; _cache = cache; _batchSize = MigrationSettings.Current.MigrationBatchSize; }
public RemoveStaleAccountsJob(OrganizationRepository organizationRepository, IProjectRepository projectRepository, IUserRepository userRepository, IEventRepository eventRepository, IStackRepository stackRepository, ILockProvider lockProvider) { _organizationRepository = organizationRepository; _projectRepository = projectRepository; _userRepository = userRepository; _eventRepository = eventRepository; _stackRepository = stackRepository; LockProvider = lockProvider; }
public EnforceRetentionLimitsJob(IOrganizationRepository organizationRepository, IEventRepository eventRepository, ILockProvider lockProvider) { _organizationRepository = organizationRepository; _eventRepository = eventRepository; LockProvider = lockProvider; }
public SetProjectIsConfiguredWorkItemHandler(IProjectRepository projectRepository, IEventRepository eventRepository, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _projectRepository = projectRepository; _eventRepository = eventRepository; _lockProvider = new CacheLockProvider(cacheClient, messageBus); }
public DownloadGeoIPDatabaseJob(ICacheClient cacheClient, IFileStorage storage, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _storage = storage; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromDays(1)); }
public ProjectMaintenanceWorkItemHandler(IProjectRepository projectRepository, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _projectRepository = projectRepository; _lockProvider = new CacheLockProvider(cacheClient, messageBus); }
public RetentionLimitsJob(IOrganizationRepository organizationRepository, IEventRepository eventRepository, ICacheClient cacheClient) { _organizationRepository = organizationRepository; _eventRepository = eventRepository; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromDays(1)); }
public DeleteValueWorkItemHandler(ICacheClient cacheClient, IMessagePublisher publisher, ILockProvider lockProvider) { _cacheClient = cacheClient; _publisher = publisher; _lockProvider = lockProvider; }
public ThrottledJob(ICacheClient client) { _locker = new ThrottlingLockProvider(client, 1, TimeSpan.FromMilliseconds(100)); }
public ElasticConfigurationBase(IQueue<WorkItemData> workItemQueue, ICacheClient cacheClient) { _workItemQueue = workItemQueue; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromMinutes(1)); }
public StackWorkItemHandler(IStackRepository stackRepository, IEventRepository eventRepository, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _stackRepository = stackRepository; _eventRepository = eventRepository; _lockProvider = new CacheLockProvider(cacheClient, messageBus); }
private async Task<bool> DoLockedWorkAsync(ILockProvider locker) { return await locker.TryUsingAsync("DoLockedWork", async () => await SystemClock.SleepAsync(500), TimeSpan.FromMinutes(1), TimeSpan.Zero).AnyContext(); }
public SnapshotJob(IElasticClient client, ILockProvider lockProvider, ILoggerFactory loggerFactory) { _client = client; _lockProvider = lockProvider; _logger = loggerFactory.CreateLogger(GetType()); }
public DailyNotificationJob(IProjectRepository projectRepository, IQueue<SummaryNotification> summaryNotificationQueue, ILockProvider lockProvider) { _projectRepository = projectRepository; _summaryNotificationQueue = summaryNotificationQueue; LockProvider = lockProvider; }
public DownloadGeoIPDatabaseJob(ICacheClient cacheClient, IFileStorage storage) { _storage = storage; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromDays(1)); }
public ThrottleBotsWorkItemHandler(IEventRepository eventRepository, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _eventRepository = eventRepository; _lockProvider = new CacheLockProvider(cacheClient, messageBus); }
public ReindexWorkItemHandler(IElasticClient client, ILockProvider lockProvider, ICacheClient cache = null, ILoggerFactory loggerFactory = null) { _reindexer = new ElasticReindexer(client, cache, loggerFactory.CreateLogger<ReindexWorkItemHandler>()); _lockProvider = lockProvider; AutoRenewLockOnProgress = true; }
public OrganizationMaintenanceWorkItemHandler(IOrganizationRepository organizationRepository, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _organizationRepository = organizationRepository; _lockProvider = new CacheLockProvider(cacheClient, messageBus); }
public LockHelper(ILockProvider provider) { LockProvider = provider; TimeOut = 10 * 1000; SleepTime = 500; }
public DisposableLock(string name, ILockProvider lockProvider) { _name = name; _lockProvider = lockProvider; }
public ReindexWorkItemHandler(IElasticClient client, ILockProvider lockProvider) { _client = client; _lockProvider = lockProvider; }
public QueueEventMigrationsJob(IQueue<EventMigrationBatch> queue, IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, EventIndex eventIndex, StackIndex stackIndex, IValidator<Stack> stackValidator, IValidator<PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) : base(elasticClient, eventUpgraderPluginManager, eventIndex, stackIndex, stackValidator, eventValidator, geoIpResolver, lockProvider, cache) { _queue = queue; }
public CloseInactiveSessionsJob(IEventRepository eventRepository, ICacheClient cacheClient) { _eventRepository = eventRepository; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromMinutes(15)); }
public CloseInactiveSessionsJob(IEventRepository eventRepository, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) : base(loggerFactory) { _eventRepository = eventRepository; _cacheClient = cacheClient; _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromMinutes(1)); }
public WithLockingJob(ILoggerFactory loggerFactory) : base(loggerFactory) { _locker = new CacheLockProvider(new InMemoryCacheClient(loggerFactory), new InMemoryMessageBus(loggerFactory), loggerFactory); }
public RedisQueue(RedisQueueOptions <T> options) : base(options) { if (options.ConnectionMultiplexer == null) { throw new ArgumentException("ConnectionMultiplexer is required."); } options.ConnectionMultiplexer.ConnectionRestored += ConnectionMultiplexerOnConnectionRestored; _cache = new RedisCacheClient(new RedisCacheClientOptions { ConnectionMultiplexer = options.ConnectionMultiplexer, Serializer = _serializer }); _payloadTimeToLive = GetPayloadTtl(); _subscriber = _options.ConnectionMultiplexer.GetSubscriber(); string listPrefix = _options.ConnectionMultiplexer.IsCluster() ? "{q:" + _options.Name + "}" : $"q:{_options.Name}"; _queueListName = $"{listPrefix}:in"; _workListName = $"{listPrefix}:work"; _waitListName = $"{listPrefix}:wait"; _deadListName = $"{listPrefix}:dead"; // min is 1 second, max is 1 minute var interval = _options.WorkItemTimeout > TimeSpan.FromSeconds(1) ? _options.WorkItemTimeout.Min(TimeSpan.FromMinutes(1)) : TimeSpan.FromSeconds(1); _maintenanceLockProvider = new ThrottlingLockProvider(_cache, 1, interval); if (_logger.IsEnabled(LogLevel.Trace)) { _logger.LogTrace("Queue {QueueId} created. Retries: {Retries} Retry Delay: {RetryDelay:g}, Maintenance Interval: {MaintenanceInterval:g}", QueueId, _options.Retries, _options.RetryDelay, interval); } }