public void Startup(ISubscriptionPersistence subscriptions, ISchedulePersistence schedules) { Services.ReplaceService(subscriptions); Services.ReplaceService(schedules); _runtime = ToRuntime(); }
public void FixtureSetUp() { FubuTransport.AllQueuesInMemory = true; runtime = FubuTransport.For <TestingJobRegistry>().StructureMap().Bootstrap(); history = runtime.Factory.Get <JobHistory>(); clock = runtime.Factory.Get <ISystemTime>().As <RewindableClock>(); theController = runtime.Factory.Get <IScheduledJobController>(); thePersistence = runtime.Factory.Get <ISchedulePersistence>(); theTimer = runtime.Factory.Get <IJobTimer>(); theController.Deactivate(); theTimer.ClearAll(); history.ClearAll(); theStartingTime = (DateTimeOffset)DateTime.Today.AddHours(8).ToUniversalTime(); theEndingTime = theStartingTime.AddSeconds(30); addTimes <Job1>(3); addTimes <Job2>(10); addTimes <Job3>(15); clock.Reset(theStartingTime.DateTime); theController.Activate(); theController.IsActive().ShouldBeTrue(); Thread.Sleep(32.Seconds()); theController.Deactivate(); }
public MonitoredNodeGroup() { _port = PortFinder.FindPort(5500); AlterSettings <KatanaSettings>(_ => { _.AutoHostingEnabled = true; _.Port = _port; }); Services(_ => { _.ReplaceService <ISchedulePersistence, RavenDbSchedulePersistence>(); _.ReplaceService <ISubscriptionPersistence, RavenDbSubscriptionPersistence>(); }); ReplaceSettings(RavenDbSettings.InMemory()); Import <MonitoredTransportRegistry>(); container = new Container(_ => { _.ForSingletonOf <MonitoredNodeGroup>().Use(this); }); _runtime = FubuApplication.For(this).StructureMap(container).Bootstrap(); _runtime.Factory.Get <ChannelGraph>().Name = "Monitoring"; _subscriptions = _runtime.Factory.Get <ISubscriptionPersistence>(); _schedules = _runtime.Factory.Get <ISchedulePersistence>(); _store = _runtime.Factory.Get <IDocumentStore>(); }
public MonitoredNodeGroup() { _port = PortFinder.FindPort(5500); AlterSettings<KatanaSettings>(_ => { _.AutoHostingEnabled = true; _.Port = _port; }); Services(_ => { _.ReplaceService<ISchedulePersistence, RavenDbSchedulePersistence>(); _.ReplaceService<ISubscriptionPersistence, RavenDbSubscriptionPersistence>(); }); ReplaceSettings(RavenDbSettings.InMemory()); Import<MonitoredTransportRegistry>(); container = new Container(_ => { _.ForSingletonOf<MonitoredNodeGroup>().Use(this); }); _runtime = FubuApplication.For(this).StructureMap(container).Bootstrap(); _runtime.Factory.Get<ChannelGraph>().Name = "Monitoring"; _subscriptions = _runtime.Factory.Get<ISubscriptionPersistence>(); _schedules = _runtime.Factory.Get<ISchedulePersistence>(); _store = _runtime.Factory.Get<IDocumentStore>(); }
public ScheduledJobsFubuDiagnostics(IUrlRegistry urls, ISchedulePersistence persistence, ChannelGraph graph, ScheduledJobGraph jobs, IScheduledJobController controller) { _urls = urls; _persistence = persistence; _graph = graph; _jobs = jobs; _controller = controller; }
public void Startup(ISubscriptionPersistence subscriptions, ISchedulePersistence schedules) { Services(_ => { _.ReplaceService(subscriptions); _.ReplaceService(schedules); }); _runtime = FubuTransport.For(this).StructureMap().Bootstrap(); }
public ScheduleStatusMonitor(ChannelGraph channels, ScheduledJobGraph jobs, ISchedulePersistence persistence, ILogger logger, ISystemTime systemTime) { _channels = channels; _persistence = persistence; _logger = logger; _systemTime = systemTime; jobs.Jobs.Each(j => { var key = JobStatus.GetKey(j.JobType); _jobTypes[key] = j.JobType; }); }