From 71961a6e71c33d5007f5a995456b4fb1b7d9c8ca Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期五, 01 七月 2022 13:27:10 +0800
Subject: [PATCH] 四川政采旧网站

---
 zhengcaioa/Crawler/Program.cs |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/zhengcaioa/Crawler/Program.cs b/zhengcaioa/Crawler/Program.cs
index aa22779..b992baf 100644
--- a/zhengcaioa/Crawler/Program.cs
+++ b/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);//闃绘璁惧畾鏃堕棿
             }
         }
 

--
Gitblit v1.9.1