username@email.com
2022-07-01 71961a6e71c33d5007f5a995456b4fb1b7d9c8ca
zhengcaioa/Crawler/Program.cs
@@ -147,6 +147,7 @@
                var cccontext = new WebCrawlerContext(dbContextOptionBuilder.UseSqlServer(connection).Options);
                //获取四川的政采数据
                sichuanoperation.operations(cccontext);
                //Console.WriteLine("这个暂停");
                Thread.CurrentThread.Join(1000*60*60*2);//阻止设定时间
            }
        }
@@ -155,8 +156,12 @@
        {
            while (true)
            {
                Console.WriteLine(DateTime.Now.ToString() + "Method2_" + Thread.CurrentThread.ManagedThreadId.ToString());
                Thread.CurrentThread.Join(1000);//阻止设定时间
                string connection = @"server=.;database=WebCrawler;uid=sa;pwd=123456;";
                var dbContextOptionBuilder = new DbContextOptionsBuilder<WebCrawlerContext>();
                var cccontext = new WebCrawlerContext(dbContextOptionBuilder.UseSqlServer(connection).Options);
                //获取四川的政采数据
                OldSichuanoperation.operations(cccontext);
                Thread.CurrentThread.Join(1000 * 60 * 60 * 2);//阻止设定时间
            }
        }