Пример #1
0
        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);
            }
        }
Пример #2
0
        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.");
                }
            }
        }