// ----------------------------------------------------------------------------- public UpdatedStagingBatch(UpdateDetectionVariables updateDetectionVariables, IsStopRequestedFunc shouldIStop) { _UpdateDetectionVariables = updateDetectionVariables; _shouldIStop = shouldIStop; GetBatchFromDB(); }
// ----------------------------------------------------------------------------- public void Start() { try { // Read from konfig LoadMembersFromConfig(); if (Disposed) { throw new ObjectDisposedException("UpdateLib.Runner.Start()", "Object is disposed"); } lock (_stoppedLock) { if (_stopped == true) { LogHelper.LogToFile("-----------------------------------------------------------------------------"); LogHelper.LogToFile("INFO: Attempting to START " + _UpdateDetectionVariables.ServiceName + "..."); // Start process thread _worker = new WorkerThread(DoOneBatch, _UpdateDetectionVariables.Tag); _stopRequestedFunc = _worker.IsStopRequested; _worker.Start(); _stopped = false; LogHelper.LogToFile("INFO: CPRBroker service URL=[" + _CPRBrokerServiceURL + "]"); LogHelper.LogToFile("INFO: Application token=[" + _appToken + "]"); LogHelper.LogToFile("INFO: Runtime identity=[" + _runIdentity + "]"); LogHelper.LogToFile("INFO: Batch run attempted every " + _pollInterval.ToString() + " seconds!"); LogHelper.LogToFile("INFO: " + _UpdateDetectionVariables.ServiceName + "..."); LogHelper.LogToFile("INFO: ---"); } } // Force timer construction PollInterval = _pollInterval; } catch (Exception ex) { throw ex; } }
// ----------------------------------------------------------------------------- public DPRUpdatedStagingBatch(IsStopRequestedFunc shouldIStop) : base(shouldIStop) { }
protected override UpdatedStagingBatch CreateUpdatedStagingBatch(IsStopRequestedFunc stopRequestedFunc) { return(new DPRUpdatedStagingBatch(stopRequestedFunc)); }