Lotteries

This commit is contained in:
2025-10-24 01:34:18 +08:00
parent 15954dbfe2
commit 7385caff9a
11 changed files with 3235 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
using Quartz;
namespace DysonNetwork.Pass.Lotteries;
public class LotteryDrawJob(LotteryService lotteryService, ILogger<LotteryDrawJob> logger) : IJob
{
public async Task Execute(IJobExecutionContext context)
{
logger.LogInformation("Starting daily lottery draw...");
try
{
await lotteryService.PerformDailyDrawAsync();
logger.LogInformation("Daily lottery draw completed successfully.");
}
catch (Exception ex)
{
logger.LogError(ex, "Error occurred during daily lottery draw.");
}
}
}