using Managing.Application.ManageBot;
using Managing.Application.Workers;
using Managing.Application.Workers.Abstractions;
using MediatR;
using static Managing.Common.Enums;

namespace Managing.Api.Workers;

public class BotManagerWorker(
    ILogger<BotManagerWorker> logger,
    IMediator mediadior,
    IWorkerService workerService)
    : BaseWorker<BotManagerWorker>(WorkerType.BotManager,
        logger,
        TimeSpan.FromMinutes(5),
        workerService)
{
    protected override async Task Run(CancellationToken cancellationToken)
    {
        var loadBackupBotCommand = new LoadBackupBotCommand();
        await mediadior.Send(loadBackupBotCommand, cancellationToken);
    }
}