Browse Source

Add setting to control thread pool size for default work queue

tags/v1.6.0
James Moger 10 years ago
parent
commit
fb9cd59683

+ 2
- 0
releases.moxie View File

@@ -38,6 +38,7 @@ r24: {
- Add setting to allow STARTTLS without requiring SMTPS (pr-183)
- Added an extension point for monitoring onStartup and onShutdown (ticket-79)
- Tag server-side merges when incremental push tags are enabled (issue-432, ticket-85)
- Add setting to control default thread pool size for miscellaneous background tasks (ticket-92)
dependencyChanges:
- Update to javax.mail 1.5.1 (issue-417, ticket-58)
contributors:
@@ -53,6 +54,7 @@ r24: {
settings:
- { name: 'web.allowDeletingNonEmptyRepositories', defaultValue: 'true' }
- { name: 'mail.starttls', defaultValue: 'false' }
- { name: 'execution.defaultThreadPoolSize', defaultValue: '1' }
}

#

+ 6
- 0
src/main/distrib/data/gitblit.properties View File

@@ -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
#

+ 2
- 1
src/main/java/com/gitblit/manager/ServicesManager.java View File

@@ -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

Loading…
Cancel
Save