配合hangfire 周期任务暂时有问题 --待解决

This commit is contained in:
2024-10-17 13:37:57 +08:00
parent a03c11ae9d
commit f1acb787f5
9 changed files with 65 additions and 31 deletions
@@ -1,4 +1,5 @@
using MassTransit;
using IRaCIS.Core.Application.MassTransit.Command;
using MassTransit;
using MassTransit.Scheduling;
using System;
using System.Collections.Generic;
@@ -22,9 +23,9 @@ public abstract class IRCRecurringSchedule :
public string TimeZoneId { get; protected set; }
public DateTimeOffset StartTime { get; protected set; }
public DateTimeOffset? EndTime { get; protected set; }
public string ScheduleId { get; private set; }
public string ScheduleId { get; set; }
public string ScheduleGroup { get; private set; }
public string CronExpression { get; protected set; }
public string CronExpression { get; set; }
public string Description { get; protected set; }
}
@@ -53,4 +54,15 @@ public class ImageQCSchedule : IRCRecurringSchedule
}
public class QCImageQuestionScheduleConsumer : IConsumer<QCImageQuestionSchedule>
{
public Task Consume(ConsumeContext<QCImageQuestionSchedule> context)
{
Console.WriteLine(DateTime.Now);
return Task.CompletedTask;
}
}