Skip to content

Commit f0e4a87

Browse files
authored
Update Main.java
1 parent d393292 commit f0e4a87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/opendota/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public void run()
162162
// Otherwise, use hostname -i to get internal IP
163163
ip = RegisterTask.shellExec("hostname -i");
164164
}
165-
int nproc = Runtime.getRuntime().availableProcessors() * 1.5;
165+
int nproc = Math.round(Runtime.getRuntime().availableProcessors() * 1.5);
166166
String postCmd = "curl -X POST --max-time 60 -L " + System.getenv().get("SERVICE_REGISTRY_HOST") + "/register/parser/" + ip + ":5600" + "?size=" + nproc + "&key=" + System.getenv().get("RETRIEVER_SECRET");
167167
System.err.println(postCmd);
168168
RegisterTask.shellExec(postCmd);

0 commit comments

Comments
 (0)