public async void Execute(IJobExecutionContext context)
     {
         var processer = new PushToRedisProcesser();
         Console.WriteLine($"WriteExecuteTime:{DateTime.Now}");
         while (true)
         {
             try
             {
                 await processer.ProcessAsync();
             }
             catch (AggregateException ex)
             {
                 Logger.Error(ex);
             }
             catch (Exception ex)
             {
                 Logger.Error(ex);
             }
         }
     }
Exemplo n.º 2
0
        public async void Execute(IJobExecutionContext context)
        {
            var processer = new PushToRedisProcesser();

            Console.WriteLine($"WriteExecuteTime:{DateTime.Now}");
            while (true)
            {
                try
                {
                    await processer.ProcessAsync();
                }
                catch (AggregateException ex)
                {
                    Logger.Error(ex);
                }
                catch (Exception ex)
                {
                    Logger.Error(ex);
                }
            }
        }