setting for database update threads

This commit is contained in:
Athou
2013-05-23 06:38:58 +02:00
parent 006a2cf807
commit 44d4d3e96b
3 changed files with 20 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ public class FeedRefreshUpdater {
@PostConstruct
public void init() {
ApplicationSettings settings = applicationSettingsService.get();
int threads = Math.max(settings.getBackgroundThreads(), 1);
int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
pool = new ThreadPoolExecutor(threads, threads, 0,
TimeUnit.MILLISECONDS, new LinkedBlockingQueue<Runnable>());
pool.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy() {