Skip to content

Commit

Permalink
Code layout and comment edits.
Browse files Browse the repository at this point in the history
Signed-off-by: Philip R. Kensche <p.kensche@dkfz-heidelberg.de>
  • Loading branch information
vinjana committed May 21, 2024
1 parent 65d0f12 commit df6d8f3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/main/groovy/de/dkfz/roddy/core/InfoObject.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
import java.util.Date;

/**
* Provides basic fields and methods for classes which represent a jobState of i.e. data sets which for a given point in time.
* Provides basic fields and methods for classes which represent a jobState of i.e. data sets which
* for a given point in time.
*/
public class InfoObject {
private static final String TIMESTAMP_FORMAT = "yyMMdd_HHmm";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ import groovy.transform.CompileStatic
import java.lang.reflect.Field
import java.nio.charset.Charset
import java.time.Duration
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.concurrent.Future
import java.util.concurrent.TimeUnit
import java.util.concurrent.TimeoutException
import java.util.concurrent.*
import java.util.function.Supplier
import java.util.stream.Collectors

Expand Down Expand Up @@ -57,14 +52,14 @@ class LocalExecutionHelper {
}

static String executeSingleCommand(String command) {
//TODO What an windows systems?
//Process process = Roddy.getLocalCommandSet().getShellExecuteCommand(command).execute();
Process process = (["bash", "-c", "${command}"]).execute();

final String separator = System.getProperty("line.separator");
process.waitFor();
if (process.exitValue()) {
throw new RuntimeException("Process could not be run" + separator + "\tCommand: bash -c " + command + separator + "\treturn code is: " + process.exitValue())
throw new RuntimeException("Process could not be run" + separator + "\tCommand: bash -c " +
command + separator + "\treturn code is: " + process.exitValue())
}

def text = process.text
Expand Down

0 comments on commit df6d8f3

Please sign in to comment.