add the ability to set the priority of the render process as commandline argument

This commit is contained in:
Rolf Aretz Lap
2017-01-05 09:58:27 +01:00
committed by Laurent Clouet
parent 2f00d7816d
commit d8aa315699
7 changed files with 105 additions and 4 deletions

View File

@@ -91,6 +91,9 @@ public class Worker {
@Option(name = "--no-systray", usage = "Don't use systray", required = false)
private boolean no_systray = false;
@Option(name = "-priority", usage = "Set render process priority (19 lowest to -19 highest)", required = false)
private int priority = 19;
public static void main(String[] args) {
new Worker().doMain(args);
}
@@ -112,6 +115,7 @@ public class Worker {
ComputeType compute_method = ComputeType.CPU;
Configuration config = new Configuration(null, login, password);
config.setPrintLog(print_log);
config.setUsePriority(priority);
if (cache_dir != null) {
File a_dir = new File(cache_dir);