public async Task Update(DateTime cursor) { using (_logger.Scope("Updating service status.")) { foreach (var manualStatusChangeCollector in _manualStatusChangeCollectors) { await manualStatusChangeCollector.FetchLatest(); } await _incidentCollector.FetchLatest(); await _activeEventUpdater.UpdateAllAsync(cursor); } }
public async Task Update() { using (_logger.Scope("Updating service status.")) { foreach (var manualStatusChangeUpdater in _manualStatusChangeUpdaters) { await ProcessCursor($"{ManualCursorBaseName}{manualStatusChangeUpdater.Name}", manualStatusChangeUpdater.ProcessNewManualChanges); } var incidentCursor = await ProcessCursor(IncidentCursorName, async (value) => { return(await _incidentUpdater.FetchNewIncidents(value)); }); await _activeEventUpdater.UpdateAllAsync(incidentCursor); } }
public async Task Update(DateTime cursor) { using (_logger.Scope("Updating service status.")) { foreach (var manualStatusChangeCollector in _manualStatusChangeCollectors) { await manualStatusChangeCollector.FetchLatest(); } try { await _incidentCollector.FetchLatest(); await _activeEventUpdater.UpdateAllAsync(cursor); await _cursor.Set(LastUpdatedCursorName, cursor); } catch (Exception e) { _logger.LogError(LogEvents.IncidentIngestionFailure, e, "Failed to update incident API data."); } } }