public MonitoredNode(string nodeId, Uri incoming, IDocumentStore store) { Policies.Local.Add <ErrorHandlingPolicy>(); AlterSettings <MonitoringSettings>(x => x.Incoming = "memory://jobs".ToUri()); Channel(x => x.Incoming).ReadIncoming(); NodeName = "Monitoring"; NodeId = nodeId; _nodeId = nodeId; ServiceBus.EnableInMemoryTransport(incoming); Services.ReplaceService(store); Services.AddService <ILogListener, ScheduledJobListener>(); ScheduledJob.DefaultJobChannel(x => x.Incoming); ScheduledJob.RunJob <AlwaysGoodJob>().ScheduledBy <TenMinuteIncrements>(); ScheduledJob.RunJob <FailsFirstTwoTimes>().ScheduledBy <SevenMinuteIncrements>(); ScheduledJob.RunJob <FailsSometimes>().ScheduledBy <FiveMinuteIncrements>(); ScheduledJob.RunJob <TimesOutSometimes>().ScheduledBy <ThreeMinuteIncrements>().Timeout(10.Seconds()); }
public ScheduledJobRegistry() { EnableInMemoryTransport(); ScheduledJob.DefaultJobChannel(x => x.Downstream); ScheduledJob.RunJob <AJob>().ScheduledBy <DummyScheduleRule>().Channel(x => x.Upstream); ScheduledJob.RunJob <BJob>().ScheduledBy <DummyScheduleRule>().Timeout(11.Minutes()); ScheduledJob.RunJob <CJob>().ScheduledBy <DummyScheduleRule>(); }
public TestingJobRegistry() { ServiceBus.EnableInMemoryTransport(); Channel(x => x.Upstream).ReadIncoming(); ScheduledJob.ActivatedOnStartup(false); ScheduledJob.DefaultJobChannel(x => x.Upstream); ScheduledJob.RunJob <Job1>().ScheduledBy(new AtSecondsAfterTheMinute(3)); ScheduledJob.RunJob <Job2>().ScheduledBy(new AtSecondsAfterTheMinute(10)); ScheduledJob.RunJob <Job3>().ScheduledBy(new AtSecondsAfterTheMinute(15)); Services.ReplaceService(new JobHistory()); Services.ReplaceService <ISystemTime>(new RewindableClock()); }
public ScheduledJobRegistry() { AlterSettings <BusSettings>(x => { x.Downstream = new Uri("lq.tcp://localhost:2233/scheduled_jobs_downstream"); x.Upstream = new Uri("lq.tcp://localhost:2233/scheduled_jobs_upstream"); }); Channel(x => x.Downstream).ReadIncoming(); ScheduledJob.DefaultJobChannel(x => x.Downstream); ScheduledJob.RunJob <AJob>().ScheduledBy <DummyScheduleRule>().Channel(x => x.Upstream); ScheduledJob.RunJob <BJob>().ScheduledBy <DummyScheduleRule>().Timeout(11.Minutes()); ScheduledJob.RunJob <CJob>().ScheduledBy <DummyScheduleRule>(); }