Skip to content

Commit

Permalink
Don't print all attempts to find appropriate PID
Browse files Browse the repository at this point in the history
GitOrigin-RevId: e61fb2098ad2235ac7ff71a69b5505b7293639aa
  • Loading branch information
MaXal authored and intellij-monorepo-bot committed Nov 30, 2023
1 parent b11bf4a commit 24d968b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.intellij.ide.starter.process.exec.ExecOutputRedirect
import com.intellij.ide.starter.process.exec.ProcessExecutor
import com.intellij.ide.starter.utils.catchAll
import com.intellij.openapi.util.SystemInfo
import com.intellij.tools.ide.util.common.PrintFailuresMode
import com.intellij.tools.ide.util.common.logOutput
import com.intellij.tools.ide.util.common.withRetry
import kotlinx.coroutines.Dispatchers
Expand Down Expand Up @@ -171,7 +172,7 @@ private fun killProcessOnUnix(pid: Int) {

fun getJavaProcessIdWithRetry(javaHome: Path, workDir: Path, originalProcessId: Long, originalProcess: Process): Long {
return requireNotNull(
withRetry(retries = 10, delay = 3.seconds, messageOnFailure = "Couldn't find appropriate java process id for pid $originalProcessId") {
withRetry(retries = 10, delay = 3.seconds, messageOnFailure = "Couldn't find appropriate java process id for pid $originalProcessId", printFailuresMode = PrintFailuresMode.ONLY_LAST_FAILURE) {
getJavaProcessId(javaHome, workDir, originalProcessId, originalProcess)
}
) { "Java process id must not be null" }
Expand Down

0 comments on commit 24d968b

Please sign in to comment.