♻️ Move the lotteries logic to the wallet service

This commit is contained in:
2026-02-05 16:13:57 +08:00
parent 3c0f5b0e41
commit 3c6ccba74f
8 changed files with 14 additions and 15 deletions

View File

@@ -0,0 +1,21 @@
using Quartz;
namespace DysonNetwork.Wallet.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.DrawLotteries();
logger.LogInformation("Daily lottery draw completed successfully.");
}
catch (Exception ex)
{
logger.LogError(ex, "Error occurred during daily lottery draw.");
}
}
}