♻️ Splitted wallet service
This commit is contained in:
24
DysonNetwork.Wallet/Payment/FundExpirationJob.cs
Normal file
24
DysonNetwork.Wallet/Payment/FundExpirationJob.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Quartz;
|
||||
|
||||
namespace DysonNetwork.Wallet.Payment;
|
||||
|
||||
public class FundExpirationJob(
|
||||
PaymentService paymentService,
|
||||
ILogger<FundExpirationJob> logger
|
||||
) : IJob
|
||||
{
|
||||
public async Task Execute(IJobExecutionContext context)
|
||||
{
|
||||
logger.LogInformation("Starting fund expiration job...");
|
||||
|
||||
try
|
||||
{
|
||||
await paymentService.ProcessExpiredFundsAsync();
|
||||
logger.LogInformation("Successfully processed expired funds");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.LogError(ex, "Error processing expired funds");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user