username@email.com
19 小时以前 7b52260c2a83d23adb5447a9e9848d90b4dc018c
zhengcaioa/Crawler/Program.cs
@@ -146,8 +146,8 @@
            thread.Start();
            //Thread thread1 = new Thread(new ThreadStart(obj.Method2));
            //thread1.Start();
            Thread thread1 = new Thread(new ThreadStart(obj.Method2));
            thread1.Start();
            //Thread thread2 = new Thread(new ThreadStart(obj.Method3));
@@ -174,6 +174,24 @@
            }
        }
        void Method2()
        {
            while (true)
            {
                //ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
                var dbContextOptionBuilder = new DbContextOptionsBuilder<WebCrawlerContext>();
                var cccontext = new WebCrawlerContext(dbContextOptionBuilder.UseSqlServer(connection2).Options);
                //var dbContextOptionBuilder1 = new DbContextOptionsBuilder<zhengcaioaContext>();
                //var cccontext1 = new zhengcaioaContext(dbContextOptionBuilder1.UseSqlServer(connection1).Options);
                sichuantousuoperation.operations1(cccontext);
                //Console.WriteLine("这个暂停");
                Thread.CurrentThread.Join(1000 * 60 * 60 * 2);//阻止设定时间
            }
        }
        //void Method1()
        //{
        //    while (true)