コード例 #1
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);
             }
         }
     }
コード例 #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);
                }
            }
        }