コード例 #1
0
        public IActionResult RunJobs()
        {
            Task.Factory.StartNew(() =>
            {
                try
                {
                    DoubanHouseCrawler.AnalyzeDoubanHouseContent();

                    //Job要执行的逻辑代码
                    PinPaiGongYuHouseCrawler.CapturPinPaiHouseInfo();

                    PeopleRentingCrawler.CapturHouseInfo();

                    DoubanHouseCrawler.CaptureHouseInfoFromConfig();

                    HouseSourceInfo.RefreshHouseSourceInfo();
                }
                catch (Exception ex)
                {
                    LogHelper.Error("RunJobs", ex);
                }
            });

            return(View());
        }
コード例 #2
0
        public IActionResult RunJobs()
        {
            DoubanHouseCrawler.CaptureHouseInfoFromConfig();
            HouseSourceInfo.RefreshHouseSourceInfo();
            PinPaiGongYuHouseCrawler.CapturPinPaiHouseInfo();

            //Task.Factory.StartNew(() =>
            //{
            //    try
            //    {

            //        PeopleRentingCrawler.CapturHouseInfo();
            //        DoubanHouseCrawler.CaptureHouseInfoFromConfig();
            //        DoubanHouseCrawler.AnalyzeDoubanHouseContentAll();
            //        HouseSourceInfo.RefreshHouseSourceInfo();
            //    }
            //    catch (Exception ex)
            //    {
            //        LogHelper.Error("RunJobs", ex);
            //    }

            //});

            return(View());
        }