Example #1
0
        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);
            }
        }
Example #2
0
 public void StartConsumigTrenEnEstacionReduceDuplicates()
 {
     QueueConsumerFor <TrenEnEstacion> .WithinCurrentThread.Using(new TrenEnEstacionReduceDuplicates())
     .With(PollingFrequencer.For(TrenEnEstacionReduceDuplicates.EstimatedTime))
     .StartConsimung();
 }
Example #3
0
 public void StartConsumigApiAccessLogSaver()
 {
     QueueConsumerFor <ApiAccessLog> .WithinCurrentThread.Using(new ApiAccessLogSaver())
     .With(PollingFrequencer.For(ApiAccessLogSaver.EstimatedTime))
     .StartConsimung();
 }
Example #4
0
 public void StartConsumigDenunciaPreciosSaver()
 {
     QueueConsumerFor <DenunciaPrecios> .WithinCurrentThread.Using(new DenunciaPreciosSaver())
     .With(PollingFrequencer.For(DenunciaPreciosSaver.EstimatedTime))
     .StartConsimung();
 }
Example #5
0
 public void StartConsumigMailsMessagesSender()
 {
     QueueConsumerFor <MailMessage> .WithinCurrentThread.Using(new MailsMessagesSender())
     .With(PollingFrequencer.For(MailsMessagesSender.EstimatedTime))
     .StartConsimung();
 }