Update lockname to default if not provided.

This commit is contained in:
vguruparan 2025-09-09 11:45:04 -05:00
parent e4c53a32b5
commit 4a1439574d
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@ public class CrontabSettings
{
public CrontabBaseSetting EventSubscriber { get; set; } = new();
public CrontabBaseSetting Watcher { get; set; } = new();
public string LockName { get; set; }
public string LockName { get; set; } = "default";
}
public class CrontabBaseSetting

View file

@ -18,7 +18,7 @@ public class CrontabWatcher : BackgroundService
_logger = logger;
_services = services;
_cronSettings = cronSettings;
DIST_KEY = $"CrontabWatcher:locker-{_cronSettings.LockName ?? "default"}";
DIST_KEY = $"CrontabWatcher:locker-{_cronSettings.LockName}";
}
protected override async Task ExecuteAsync(CancellationToken stoppingToken)