server-master/srcs/MailServer/Consumers/ServiceFlushAllMessageConsumer.cs
2026-02-10 18:21:30 +01:00

20 lines
No EOL
618 B
C#

using System.Threading;
using System.Threading.Tasks;
using MailServer.RecurrentJobs;
using PhoenixLib.ServiceBus;
using WingsAPI.Communication.Services.Messages;
namespace MailServer.Consumers
{
public class ServiceFlushAllMessageConsumer : IMessageConsumer<ServiceFlushAllMessage>
{
private readonly MailSystem _mailSystem;
public ServiceFlushAllMessageConsumer(MailSystem mailSystem) => _mailSystem = mailSystem;
public async Task HandleAsync(ServiceFlushAllMessage notification, CancellationToken token)
{
await _mailSystem.ProcessMain();
}
}
}