public MainProcessor( AzureUtils.ApplicationClientInfo applicationClientInfo, AzureUtils.StorageAccountInfo storageAccountInfo, string tsidCheckpointingTableName, string stationObservationsCheckpointingPartitionKey, string eventHubConnectionString, string azureMapsSubscriptionKey, string azureMapsCacheTableName, string tsiEnvironmentFqdn) { _noaaClient = new NoaaClient(); _stationsProcessor = new StastionsProcessor( _noaaClient, TsiDataClient.AadLoginAsApplication(applicationClientInfo), tsiEnvironmentFqdn, new AzureMapsClient( azureMapsSubscriptionKey, AzureUtils.GetOrCreateTableAsync(storageAccountInfo, azureMapsCacheTableName).Result)); _stationObservationsCheckpointing = new TsidCheckpointing( AzureUtils.GetOrCreateTableAsync(storageAccountInfo, tsidCheckpointingTableName).Result, stationObservationsCheckpointingPartitionKey); _stationObservationProcessors = new Dictionary <string, StationObservationsProcessor>(); _eventHubClient = EventHubClient.CreateFromConnectionString(eventHubConnectionString); }
public StastionsProcessor( NoaaClient noaaClient, TsiDataClient tsiDataClient, string tsiEnvironmentFqdn, AzureMapsClient azureMapsClient) { _noaaClient = noaaClient; _tsiDataClient = tsiDataClient; _tsiEnvironmentFqdn = tsiEnvironmentFqdn; _azureMapsClient = azureMapsClient; Stations = new Station[0]; }
public StationObservationsProcessor( string stationShortId, NoaaClient noaaClient, EventHubClient eventHubClient, TsidCheckpointing checkpointing) { StationShortId = stationShortId; _noaaClient = noaaClient; _eventHubClient = eventHubClient; _checkpointing = checkpointing; _lastCommittedTimestamp = null; _lastSuccessfulPullTime = DateTime.MinValue; GoodNextTimeToProcess = DateTime.MinValue; }