Skip to content

Commit

Permalink
Allow for slow Python startup
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Oct 18, 2024
1 parent ef239e5 commit 86e6295
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ private void initializeRemoting(ExecutionContext ctx) throws IOException {
processBuilder.redirectError(new File("/dev/null"));
}
pythonProcess = processBuilder.start();
for (int i = 0; i < 5 && pythonProcess.isAlive(); i++) {
for (int i = 0; i < 30 && pythonProcess.isAlive(); i++) {
if (isServerRunning(port)) {
break;
}
try {
Thread.sleep(50);
Thread.sleep(100);
} catch (InterruptedException ignore) {
}
}
Expand Down

0 comments on commit 86e6295

Please sign in to comment.