Skip to content

Commit

Permalink
Simplify output buffer construction
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl DeBisschop committed Nov 2, 2020
1 parent de7969f commit f5aec19
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/bioraft/rundeck/rancher/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private Constants() {
public static final int INTERVAL_MILLIS = 2000;

@SuppressWarnings("SpellCheckingInspection")
public static final String STDERR_TOKEN = "STDERR_6v9ZvwThpU1FtyrlIBf4UIC8";
public static final String STDERR_TOKEN = ";v9ZvwThpU1FtyrlIBf4UIC8";

// These are fields in JSON from Rancher API.
public static final String NODE_ID = "id";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public static void runJob(String url, String accessKey, String secretKey, String
*/
private static String[] remoteCommand(String[] command, String temp) {
String file = temp + ".pid; ";
// Prefix STDERR lines with STDERR_TOK to decode in logging step.
// Prefix STDERR lines with STDERR_TOKEN to decode in logging step.
String cmd = String.join(" ", command);
String job = "( " + cmd + " ) 2> >(while read line;do echo \"" + STDERR_TOKEN + "$line\";done)";
// Note that bash is required to support adding a prefix token to STDERR.
Expand Down

0 comments on commit f5aec19

Please sign in to comment.