配合hangfire 周期任务暂时有问题 --待解决
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user