处理延时的任务
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-17 14:32:46 +08:00
parent b0d17b0466
commit 05693d090d
9 changed files with 56 additions and 9 deletions
+3 -2
View File
@@ -17,12 +17,13 @@ public abstract class DomainEvent
public Guid EventId { get; set; } = NewId.NextSequentialGuid();
//是不是延迟消费的事件,需要用定时任务调度
public bool IsScheduleEvent { get; set; }=false;
public bool IsDelayScheduleEvent => DelaySeconds!=null && DelaySeconds > 0;
/// <summary>
/// 在事件产生多少s后开始消费该事件
/// </summary>
public int DelaySeconds{ get; set; }
public int? DelaySeconds{ get; set; }
public string CultureInfoName { get; set; } = CultureInfo.CurrentCulture.Name;
}