Commits

jetb...@munit-thinkpad  committed ef3c083

do not start seeder in serverStartup event

  • Participants
  • Parent commits 540f0e6

Comments (0)

Files changed (1)

File server/src/jetbrains/buildServer/artifactsMirror/TorrentConfigurator.java

 import jetbrains.buildServer.serverSide.BuildServerAdapter;
 import jetbrains.buildServer.serverSide.BuildServerListener;
 import jetbrains.buildServer.serverSide.ServerPaths;
+import jetbrains.buildServer.serverSide.executors.ExecutorServices;
 import jetbrains.buildServer.util.EventDispatcher;
 import jetbrains.buildServer.util.FileUtil;
 import jetbrains.buildServer.util.PropertiesUtil;
                              @NotNull EventDispatcher<BuildServerListener> dispatcher,
                              @NotNull ServerTorrentsDirectorySeeder torrentsDirectorySeeder,
                              @NotNull TorrentTrackerManager trackerManager,
-                             @NotNull XmlRpcHandlerManager xmlRpcHandlerManager) {
+                             @NotNull XmlRpcHandlerManager xmlRpcHandlerManager,
+                             @NotNull final ExecutorServices executors) {
     mySeederManager = torrentsDirectorySeeder;
     myTrackerManager = trackerManager;
     myServerPaths = serverPaths;
         if (isEnabled(TRACKER_ENABLED)) {
           myTrackerManager.startTracker();
         }
-        if (isEnabled(SEEDER_ENABLED)) {
-          startSeeder();
-        }
+        executors.getLowPriorityExecutorService().submit(new Runnable() {
+          public void run() {
+            if (isEnabled(SEEDER_ENABLED)) {
+              startSeeder();
+            }
+          }
+        });
       }
     });