commit
11d85805d8
|
|
@ -5,9 +5,15 @@ public class CrontabSettings
|
|||
public CrontabBaseSetting EventSubscriber { get; set; } = new();
|
||||
public CrontabBaseSetting Watcher { get; set; } = new();
|
||||
public string LockName { get; set; } = "CrontabWatcher:locker";
|
||||
public DebugSetting Debug { get; set; } = new();
|
||||
}
|
||||
|
||||
public class CrontabBaseSetting
|
||||
{
|
||||
public bool Enabled { get; set; } = true;
|
||||
}
|
||||
|
||||
public class DebugSetting
|
||||
{
|
||||
public string AllowRuleTrigger { get; set; } = "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,10 @@ public class CrontabWatcher : BackgroundService
|
|||
_logger.LogInformation($"The current time matches the cron expression {item}");
|
||||
|
||||
#if DEBUG
|
||||
await HandleCrontabEvent(item);
|
||||
if (item.Title == settings.Debug.AllowRuleTrigger)
|
||||
{
|
||||
await HandleCrontabEvent(item);
|
||||
}
|
||||
#else
|
||||
if (publisher != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue