summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/config/default.conf1
-rwxr-xr-xpyLoadCore.py3
2 files changed, 4 insertions, 0 deletions
diff --git a/module/config/default.conf b/module/config/default.conf
index 4ccf2e555..5994974e8 100644
--- a/module/config/default.conf
+++ b/module/config/default.conf
@@ -31,6 +31,7 @@ general - "General":
bool folder_per_package : "Create folder for each package" = True
bool skip_existing : "Skip already existing files" = False
ip download_interface : "Outgoing IP address for downloads" = None
+ int renice : "CPU Priority" = 0
permission - "Permissions":
bool change_user : "Change user of running process" = False
str user : "Username" = user
diff --git a/pyLoadCore.py b/pyLoadCore.py
index dadb85436..82900e58a 100755
--- a/pyLoadCore.py
+++ b/pyLoadCore.py
@@ -194,6 +194,9 @@ class Core(object):
self.debug = self.doDebug or self.config['general']['debug_mode']
+ if os.name != "nt" and self.config["general"]["renice"]:
+ os.system("renice %d %d" % (self.config["general"]["renice"], os.getpid()) )
+
if self.config["permission"]["change_group"]:
if os.name != "nt":