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 void Deactivate(IActivationLog log) { if (_settings.Enabled) { return; } log.Trace("Shutting down the scheduled jobs"); _scheduledJobs.Deactivate(); }
public void Deactivate() { _controller.Deactivate(); }