浏览代码

update entry point runner

Luke Pulverenti 9 年之前
父节点
当前提交
2561b29cba
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      MediaBrowser.Server.Startup.Common/ApplicationHost.cs

+ 6 - 3
MediaBrowser.Server.Startup.Common/ApplicationHost.cs

@@ -330,18 +330,21 @@ namespace MediaBrowser.Server.Startup.Common
             HttpServer.GlobalResponse = null;
 
             PerformPostInitMigrations();
+            Logger.Info("Post-init migrations complete");
 
-            Parallel.ForEach(GetExports<IServerEntryPoint>(), entryPoint =>
+            foreach (var entryPoint in GetExports<IServerEntryPoint>().ToList())
             {
+                var name = entryPoint.GetType().FullName;
                 try
                 {
                     entryPoint.Run();
                 }
                 catch (Exception ex)
                 {
-                    Logger.ErrorException("Error in {0}", ex, entryPoint.GetType().FullName);
+                    Logger.ErrorException("Error in {0}", ex, name);
                 }
-            });
+            }
+            Logger.Info("Entry points complete");
 
             LogManager.RemoveConsoleOutput();
         }