diff options
author | 2017-07-04 09:58:53 -0400 | |
---|---|---|
committer | 2017-07-05 10:58:14 -0400 | |
commit | b259cc4491a6d43a3fe025d9de401f724373fca8 (patch) | |
tree | 106c35a2658d50aebab182989bc28b565d52e210 /src/main/java/com/google/devtools/build/lib/actions | |
parent | a8a594323661f915c69f44e3d880a0c503234a74 (diff) |
Allow the remote server to set its own default action timeout when Bazel does not have one. Hardcoded value of 120 seconds is clearly a mistake.
TESTED=remote worker
PiperOrigin-RevId: 160891214
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/actions/Spawns.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/Spawns.java b/src/main/java/com/google/devtools/build/lib/actions/Spawns.java index be4a0db1ad..35cfd5568e 100644 --- a/src/main/java/com/google/devtools/build/lib/actions/Spawns.java +++ b/src/main/java/com/google/devtools/build/lib/actions/Spawns.java @@ -25,21 +25,12 @@ public final class Spawns { private Spawns() {} /** - * Parse the timeout key in the spawn execution info, if it exists. Return -1 if the key does not - * exist. + * Parse the timeout key in the spawn execution info, if it exists. Otherwise, return -1. */ public static int getTimeoutSeconds(Spawn spawn) throws ExecException { - return getTimeoutSeconds(spawn, -1); - } - - /** - * Parse the timeout key in the spawn execution info, if it exists. Otherwise, return the given - * default timeout. - */ - public static int getTimeoutSeconds(Spawn spawn, int defaultTimeout) throws ExecException { String timeoutStr = spawn.getExecutionInfo().get("timeout"); if (timeoutStr == null) { - return defaultTimeout; + return -1; } try { return Integer.parseInt(timeoutStr); |