File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed
src/Infrastructure/BotSharp.Core.Crontab Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -5,5 +5,10 @@ namespace BotSharp.Core.Crontab.Abstraction;
5
5
/// </summary>
6
6
public interface ICrontabSource
7
7
{
8
+ /// <summary>
9
+ /// Set to true if the cron is real-time like Change Data Capture (CDC).
10
+ /// </summary>
11
+ bool IsRealTime => false ;
12
+
8
13
CrontabItem GetCrontabItem ( ) ;
9
14
}
Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ public async Task<List<CrontabItem>> GetCrontable()
51
51
var cronsources = _services . GetServices < ICrontabSource > ( ) ;
52
52
foreach ( var source in cronsources )
53
53
{
54
+ if ( source . IsRealTime )
55
+ {
56
+ continue ;
57
+ }
54
58
var item = source . GetCrontabItem ( ) ;
55
59
fixedCrantabItems . Add ( source . GetCrontabItem ( ) ) ;
56
60
}
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ private async Task RunCronChecker(IServiceProvider services)
45
45
{
46
46
var cron = services . GetRequiredService < ICrontabService > ( ) ;
47
47
var crons = await cron . GetCrontable ( ) ;
48
-
49
48
var publisher = services . GetService < IEventPublisher > ( ) ;
50
49
51
50
foreach ( var item in crons )
You can’t perform that action at this time.
0 commit comments