docker files fixes from liaqat
This commit is contained in:
29
src/Managing.Api.Workers/Workers/TraderWatcher.cs
Normal file
29
src/Managing.Api.Workers/Workers/TraderWatcher.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using Managing.Application.Abstractions.Services;
|
||||
using Managing.Application.Workers.Abstractions;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Api.Workers.Workers;
|
||||
|
||||
public class TraderWatcher : BaseWorker<FeeWorker>
|
||||
{
|
||||
private readonly ITradingService _tradingService;
|
||||
private static readonly WorkerType _workerType = WorkerType.TraderWatcher;
|
||||
|
||||
public TraderWatcher(
|
||||
ILogger<FeeWorker> logger,
|
||||
ITradingService tradingService,
|
||||
IWorkerService workerService) : base(
|
||||
_workerType,
|
||||
logger,
|
||||
TimeSpan.FromSeconds(120),
|
||||
workerService
|
||||
)
|
||||
{
|
||||
_tradingService = tradingService;
|
||||
}
|
||||
|
||||
protected override async Task Run(CancellationToken cancellationToken)
|
||||
{
|
||||
await _tradingService.WatchTrader();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user