Files
Swarm/DysonNetwork.Pass/Account/Presences/SpotifyPresenceUpdateJob.cs
2025-11-02 15:32:20 +08:00

22 lines
672 B
C#

using Quartz;
namespace DysonNetwork.Pass.Account.Presences;
public class SpotifyPresenceUpdateJob(SpotifyPresenceService spotifyPresenceService, ILogger<SpotifyPresenceUpdateJob> logger) : IJob
{
public async Task Execute(IJobExecutionContext context)
{
logger.LogInformation("Starting Spotify presence updates...");
try
{
await spotifyPresenceService.UpdateAllSpotifyPresencesAsync();
logger.LogInformation("Spotify presence updates completed successfully.");
}
catch (Exception ex)
{
logger.LogError(ex, "Error occurred during Spotify presence updates.");
}
}
}