summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-05-29 12:40:35 -0400
committerJames Moger <james.moger@gitblit.com>2014-05-29 12:40:35 -0400
commitfb9cd5968346045e1129406ca54639075316a396 (patch)
treee0b032b69b41cbd3b4815d6866224ab8cfc66c98 /src
parent4bdf5a568311796772b46efc6e6ce30e10a01757 (diff)
downloadgitblit-fb9cd5968346045e1129406ca54639075316a396.tar.gz
gitblit-fb9cd5968346045e1129406ca54639075316a396.zip
Add setting to control thread pool size for default work queue
Diffstat (limited to 'src')
-rw-r--r--src/main/distrib/data/gitblit.properties6
-rw-r--r--src/main/java/com/gitblit/manager/ServicesManager.java3
2 files changed, 8 insertions, 1 deletions
diff --git a/src/main/distrib/data/gitblit.properties b/src/main/distrib/data/gitblit.properties
index 7d74c281..b27395c3 100644
--- a/src/main/distrib/data/gitblit.properties
+++ b/src/main/distrib/data/gitblit.properties
@@ -613,6 +613,12 @@ plugins.folder = ${baseFolder}/plugins
# SINCE 1.5.0
plugins.registry = http://plugins.gitblit.com/plugins.json
+# Number of threads used to handle miscellaneous tasks in the background.
+#
+# SINCE 1.6.0
+# RESTART REQUIRED
+execution.defaultThreadPoolSize = 1
+
#
# Groovy Integration
#
diff --git a/src/main/java/com/gitblit/manager/ServicesManager.java b/src/main/java/com/gitblit/manager/ServicesManager.java
index b1c97ba4..755d8bac 100644
--- a/src/main/java/com/gitblit/manager/ServicesManager.java
+++ b/src/main/java/com/gitblit/manager/ServicesManager.java
@@ -80,8 +80,9 @@ public class ServicesManager implements IManager {
public ServicesManager(IGitblit gitblit) {
this.settings = gitblit.getSettings();
this.gitblit = gitblit;
+ int defaultThreadPoolSize = settings.getInteger(Keys.execution.defaultThreadPoolSize, 1);
this.idGenerator = new IdGenerator();
- this.workQueue = new WorkQueue(idGenerator, 1);
+ this.workQueue = new WorkQueue(idGenerator, defaultThreadPoolSize);
}
@Override