示例#1
0
        public async Task ProcessAsync()
        {
            List <AAGetModel> peroidLists = SqlDal.GetPeriodAAModelList();

            Console.WriteLine($"TestTask:{DateTime.Now}");
            if (peroidLists.Any())
            {
                bool pushSuccess = await Redishelper.BoolPushList <AAGetModel>("SortingList", peroidLists);

                if (pushSuccess)
                {
                    SqlDal.ChangePeriodAAModelInfoListStatusInSql(peroidLists);
                    Console.WriteLine($"ChangeStatus:{DateTime.Now}");
                }
            }
            else
            {
                Console.WriteLine($"sleep:{DateTime.Now}");
                Thread.Sleep(20000);
            }
        }