Пример #1
0
 public static IJobDetail CreateJob(ScheduleKey key, JobDataMap jobDataMap)
 {
     return(JobBuilder.Create <QuartzJob>()
            .WithIdentity(key.ToJobKey())
            .WithDescription(key.Description)
            .UsingJobData(jobDataMap)
            .RequestRecovery(true)
            .Build());
 }
Пример #2
0
        public static IJobDetail Create(ScheduleKey key, DomainEvent eventToSchedule, IMessageMetadata metadata)
        {
            var serializedEvent    = Serialize(eventToSchedule);
            var serializedKey      = Serialize(key);
            var serializedMetadata = Serialize(metadata);

            var jobDataMap = new JobDataMap
            {
                { EventKey, serializedEvent },
                { ScheduleKey, serializedKey },
                { MetadataKey, serializedMetadata }
            };

            return(CreateJob(key, jobDataMap));
        }
Пример #3
0
        public static IJobDetail Create(ScheduleKey key,
                                        Command command,
                                        IMessageMetadata metadata,
                                        ExecutionOptions executionOptions)
        {
            var jobDataMap = new JobDataMap
            {
                { CommandKey, Serialize(command) },
                { ScheduleKey, Serialize(key) },
                { ExecutionOptionsKey, Serialize(executionOptions) },
                { MetadataKey, Serialize(metadata) }
            };

            return(CreateJob(key, jobDataMap));
        }