Blazor & WASM in combination to get statistics from Spotify API for performing the song analysis. With separate microservices for auth, Spotify, user data tracking, and application, connected through gRPC with Polly.
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Worker.cs 566B

123456789101112131415161718192021
  1. namespace SpotifyWorker
  2. {
  3. public class Worker : BackgroundService
  4. {
  5. private readonly ILogger<Worker> _logger;
  6. public Worker(ILogger<Worker> logger)
  7. {
  8. _logger = logger;
  9. }
  10. protected override async Task ExecuteAsync(CancellationToken stoppingToken)
  11. {
  12. while (!stoppingToken.IsCancellationRequested)
  13. {
  14. _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
  15. await Task.Delay(1000, stoppingToken);
  16. }
  17. }
  18. }
  19. }