31 lines
834 B
C#
31 lines
834 B
C#
using Managing.Application.Abstractions.Services;
|
|
using Managing.Application.Workers;
|
|
using Managing.Application.Workers.Abstractions;
|
|
using static Managing.Common.Enums;
|
|
|
|
namespace Managing.Api.Workers.Workers;
|
|
|
|
public class FeeWorker : BaseWorker<FeeWorker>
|
|
{
|
|
private readonly ITradingService _tradingService;
|
|
private static readonly WorkerType _workerType = WorkerType.Fee;
|
|
|
|
public FeeWorker(
|
|
ILogger<FeeWorker> logger,
|
|
ITradingService tradingService,
|
|
IWorkerService workerService) : base(
|
|
_workerType,
|
|
logger,
|
|
TimeSpan.FromHours(12),
|
|
workerService
|
|
)
|
|
{
|
|
_tradingService = tradingService;
|
|
}
|
|
|
|
protected override async Task Run(CancellationToken cancellationToken)
|
|
{
|
|
_tradingService.UpdateFee(TradingExchanges.Evm);
|
|
}
|
|
}
|