// Method called every 60 seconds private async Task UpdatePeriodic() { // Change bot status await _client.SetGameAsync($"pk;help | in {_client.Guilds.Count} servers"); await _collector.CollectStats(); _logger.Information("Submitted metrics to backend"); await Task.WhenAll(((IMetricsRoot)_metrics).ReportRunner.RunAllAsync()); }
private async Task UpdatePeriodic() { _logger.Information("Running once-per-minute scheduled tasks"); await UpdateBotStatus(); // Collect some stats, submit them to the metrics backend await _collector.CollectStats(); await Task.WhenAll(((IMetricsRoot)_metrics).ReportRunner.RunAllAsync()); _logger.Information("Submitted metrics to backend"); }
private async Task UpdatePeriodic() { _logger.Debug("Running once-per-minute scheduled tasks"); await UpdateBotStatus(); // Clean up message cache in postgres await _commandMessageService.CleanupOldMessages(); // Collect some stats, submit them to the metrics backend await _collector.CollectStats(); await Task.WhenAll(((IMetricsRoot)_metrics).ReportRunner.RunAllAsync()); _logger.Debug("Submitted metrics to backend"); }