public void AddNewSiteConfiguration(AddNewSiteConfigurationDto addNewSiteConfigurationData) { var siteConfiguration = new SiteConfiguration { SiteUrl = addNewSiteConfigurationData.SiteUrl, SiteStatusCheckIntervalTypeId = addNewSiteConfigurationData.SiteStatusCheckIntervalTypeId, SiteStatusCheckInterval = addNewSiteConfigurationData.SiteStatusCheckInterval, LastUpdated = DateTime.UtcNow }; _siteConfigurationRepository .AddNewSiteConfiguration(siteConfiguration); _unitOfWork.Complete(); _siteStatusCheckScheduler.Schedule(siteConfiguration); }
public void InitializeSiteStatusChecking() { var siteConfigurations = _siteConfigurationRepository.ListSiteConfigurations(); foreach (var siteConfiguration in siteConfigurations) { _siteStatusCheckScheduler.Schedule(siteConfiguration); } }