Commit 7139ec12 by 泽锋 李

fix

parent 2ce6b9c6
...@@ -17,11 +17,20 @@ namespace AutoTurnOver.DownloadService ...@@ -17,11 +17,20 @@ namespace AutoTurnOver.DownloadService
{ {
Task.Factory.StartNew(async () => Task.Factory.StartNew(async () =>
{ {
try
{
Console.WriteLine($"开始 下载任务 ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"开始 下载任务 ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
await new TaskDownloadServices().Download(); await new TaskDownloadServices().Download();
Console.WriteLine($"结束 下载任务 ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"结束 下载任务 ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Thread.Sleep(3 * 1000); Thread.Sleep(3 * 1000);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine(ex.StackTrace);
}
}); });
return Task.CompletedTask; return Task.CompletedTask;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment