private async Task RunAsync(CancellationToken cancellationToken) { QueueConsumerFor <ApiAccessLog> .WithStandaloneThread.Using(new ApiAccessLogSaver()) .With(PollingFrequencer.For(ApiAccessLogSaver.EstimatedTime)) .StartConsimung(); QueueConsumerFor <MailMessage> .WithStandaloneThread.Using(new MailsMessagesSender()) .With(PollingFrequencer.For(MailsMessagesSender.EstimatedTime)) .StartConsimung(); QueueConsumerFor <TrenEnEstacion> .WithStandaloneThread.Using(new TrenEnEstacionReduceDuplicates()) .With(PollingFrequencer.For(TrenEnEstacionReduceDuplicates.EstimatedTime)) .StartConsimung(); while (!cancellationToken.IsCancellationRequested) { Trace.TraceInformation("Working"); await Task.Delay(1000, cancellationToken); } }
public void StartConsumigTrenEnEstacionReduceDuplicates() { QueueConsumerFor <TrenEnEstacion> .WithinCurrentThread.Using(new TrenEnEstacionReduceDuplicates()) .With(PollingFrequencer.For(TrenEnEstacionReduceDuplicates.EstimatedTime)) .StartConsimung(); }
public void StartConsumigApiAccessLogSaver() { QueueConsumerFor <ApiAccessLog> .WithinCurrentThread.Using(new ApiAccessLogSaver()) .With(PollingFrequencer.For(ApiAccessLogSaver.EstimatedTime)) .StartConsimung(); }
public void StartConsumigDenunciaPreciosSaver() { QueueConsumerFor <DenunciaPrecios> .WithinCurrentThread.Using(new DenunciaPreciosSaver()) .With(PollingFrequencer.For(DenunciaPreciosSaver.EstimatedTime)) .StartConsimung(); }
public void StartConsumigMailsMessagesSender() { QueueConsumerFor <MailMessage> .WithinCurrentThread.Using(new MailsMessagesSender()) .With(PollingFrequencer.For(MailsMessagesSender.EstimatedTime)) .StartConsimung(); }