public void CallUploadApplyRule_Tester() { DependencyRegistrar.RegisterDependencies(); var autoMapperBootstrapper = new AutoMapperBootstrapper(); autoMapperBootstrapper.Bootstrap(); _callUploadFileParserApplyRulePollingAgent = IoC.Resolve <IApplyRulesOnLockedCustomersPollingAgent>(); _callUploadFileParserApplyRulePollingAgent.PollForApplyRule(); }
public CallUploadService(ILogManager logManager, ISettings settings, ICallUploadFileParserPollingAgent callUploadFileParserPollingAgent, IApplyRulesOnLockedCustomersPollingAgent applyRulesOnLockedCustomersPollingAgent , IExportableReportsPollingAgent exportableReportsPollingAgent, IDeleteExportableReportsPollingAgent deleteExportableReportsPollingAgent, IRapsUploadFileParserPollingAgent rapsUploadFileParserPollingAgent, IPhoneNumberUpdatePollingAgent phoneNumberUpdatePollingAgent, IMergeCustomerPollingAgent mergeCustomerPollingAgent, ITwilioMessagePollingAgent twilioMessagePollingAgent, IEligibilityUploadParsePollingAgent eligibilityUploadParsePollingAgent, IMedicationUploadFileParserPollingAgent medicationUploadFileParserPollingAgent, ICustomerActivityTypeUploadPollingAgent customerActivityTypeUploadPollingAgent) { InitializeComponent(); _logger = logManager.GetLogger("Jobs.CallUploadService"); _pollThreadCallUploadFileParser = new IntervalWorkThread(callUploadFileParserPollingAgent.PollForParsingCallUpload); _timerCallUploadFileParser = new Timer(x => _pollThreadCallUploadFileParser.Trigger(), new object(), new TimeSpan(0, 0, 2, 0), new TimeSpan(0, 0, settings.CallUploadParserInterval, 0)); _pollThreadApplyRulesOnLockedCustomers = new IntervalWorkThread(applyRulesOnLockedCustomersPollingAgent.PollForApplyRule); _timerApplyRulesOnLockedCustomers = new Timer(x => _pollThreadApplyRulesOnLockedCustomers.Trigger(), new object(), new TimeSpan(0, 0, 2, 0), new TimeSpan(0, 12, settings.ApplyRulesOnLockedCustomersInterval, 0)); _pollThreadExportableReports = new IntervalWorkThread(exportableReportsPollingAgent.PollForExportableRequest); _timerExportableReports = new Timer(x => _pollThreadExportableReports.Trigger(), new object(), new TimeSpan(0, 0, 0, 0), new TimeSpan(0, 0, 2, 0)); _pollThreaDeleteExportableReports = new IntervalWorkThread(deleteExportableReportsPollingAgent.DeleteReports); _timerDeleteExportableReports = new Timer(x => _pollThreaDeleteExportableReports.Trigger(), new object(), new TimeSpan(0, 0, 0, 0), new TimeSpan(0, 6, 0, 0)); _pollThreadRapsUploadFileParser = new IntervalWorkThread(rapsUploadFileParserPollingAgent.PollForParsingRapsUpload); _timerRapsUploadFileParser = new Timer(x => _pollThreadRapsUploadFileParser.Trigger(), new object(), new TimeSpan(0, 0, 0, 0), new TimeSpan(0, 4, settings.RapsUploadParserInterval, 0)); _pollThreadPhoneNumberUpdateUpload = new IntervalWorkThread(phoneNumberUpdatePollingAgent.PollForPhoneNumberUpdate); _timerPhoneNumberUpdateUpload = new Timer(x => _pollThreadPhoneNumberUpdateUpload.Trigger(), new object(), GetDueTime(settings.PhoneNumberUpdateScheduleTime), new TimeSpan(0, settings.PhoneNumberUpdateIntervalHours, 0, 0)); _pollMergeCustomerUpload = new IntervalWorkThread(mergeCustomerPollingAgent.PollForMergeCustomerUpload); _timerMergeCustomerUpload = new Timer(x => _pollMergeCustomerUpload.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, settings.MergeCustomerInterval, 0)); _pollTwilioMessagePollingAgentThread = new IntervalWorkThread(twilioMessagePollingAgent.PollForTwilioResponse); _timerTwilioMessagePollingAgent = new Timer(x => _pollTwilioMessagePollingAgentThread.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, 0, 1)); _pollEligibilityUploadAgentThread = new IntervalWorkThread(eligibilityUploadParsePollingAgent.PollForParsingEligibilityUpload); _timerEligibilityUploadPollingAgent = new Timer(x => _pollEligibilityUploadAgentThread.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, settings.EligibilityUploadIntervalMinutes, 0)); _pollParsingMedicationUpload = new IntervalWorkThread(medicationUploadFileParserPollingAgent.PollForParsingMedicationUpload); _timerParsingMedicationUpload = new Timer(x => _pollParsingMedicationUpload.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, settings.MedicationFileParserIntervalMinute, 0)); _pollCustomerActivityTypeUploadAgentThread = new IntervalWorkThread(customerActivityTypeUploadPollingAgent.PollForParsingCustomerActivityTypeUpload); _timerCustomerActivityTypeUploadPollingAgent = new Timer(x => _pollCustomerActivityTypeUploadAgentThread.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, settings.CustomerActivityTypeUploadIntervalMinutes, 0)); }