public async Task RunAsync() { try { while (!tokenProvider.Token.IsCancellationRequested) { StormReplay?stormReplay = await provider.TryLoadReplayAsync(); if (stormReplay != null) { logger.LogInformation("Loaded: " + stormReplay.Path); await writer.WriteDetailsAsync(stormReplay); await runner.ReplayAsync(stormReplay); } } } catch (Exception e) { logger.LogError(e, "There was an error in the replay consumer."); } finally { } }
public async Task RunAsync() { try { await gameData.LoadDataAsync(); while (!tokenProvider.Token.IsCancellationRequested) { StormReplay?stormReplay = await replayProvider.TryLoadReplayAsync(); if (stormReplay != null) { await gameManager.SetSessionAsync(stormReplay); await gameManager.SpectateSessionAsync(); } } } catch (Exception e) { logger.LogError(e, "There was an error in the replay consumer."); } }