| | |
| | | var cccontext = new WebCrawlerContext(dbContextOptionBuilder.UseSqlServer(connection).Options); |
| | | //获取四川的政采数据 |
| | | sichuanoperation.operations(cccontext); |
| | | //Console.WriteLine("这个暂停"); |
| | | Thread.CurrentThread.Join(1000*60*60*2);//阻止设定时间 |
| | | } |
| | | } |
| | |
| | | { |
| | | 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);//阻止设定时间 |
| | | } |
| | | } |
| | | |