diff --git a/build.gradle b/build.gradle index 2283360..7ed710f 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ plugins { } group = 'cd.go.gocd' -version = '1.0.3' +version = '1.0.4' project.ext.projectDesc = [ id : 'cd.go.gocd.gocd-database-migrator', diff --git a/src/main/java/com/thoughtworks/go/dbsync/cli/Args.java b/src/main/java/com/thoughtworks/go/dbsync/cli/Args.java index 47d7748..4782d9c 100644 --- a/src/main/java/com/thoughtworks/go/dbsync/cli/Args.java +++ b/src/main/java/com/thoughtworks/go/dbsync/cli/Args.java @@ -63,7 +63,7 @@ public class Args { public boolean progress = false; @Parameter(names = {"--threads", "-t"}, description = "Number of import threads. Defaults to number of processors (max of 8).", order = 1400) - public int threads = Math.max(8, Runtime.getRuntime().availableProcessors()); + public int threads = Math.min(8, Runtime.getRuntime().availableProcessors()); @Parameter(names = {"--export-timeout"}, description = "Number of seconds to allow data to by exported from source to target database before timing out.", order = 1500) public long exportTimeoutSeconds = TimeUnit.MINUTES.toSeconds(30);