mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
limit queue sizes
This commit is contained in:
@@ -75,7 +75,7 @@ public class FeedRefreshUpdater {
|
||||
public void init() {
|
||||
ApplicationSettings settings = applicationSettingsService.get();
|
||||
int threads = Math.max(settings.getDatabaseUpdateThreads(), 1);
|
||||
pool = new FeedRefreshExecutor("feed-refresh-updater", threads, 500 * threads);
|
||||
pool = new FeedRefreshExecutor("feed-refresh-updater", threads, Math.min(50 * threads, 1000));
|
||||
locks = Striped.lazyWeakLock(threads * 100000);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ public class FeedRefreshWorker {
|
||||
private void init() {
|
||||
ApplicationSettings settings = applicationSettingsService.get();
|
||||
int threads = settings.getBackgroundThreads();
|
||||
pool = new FeedRefreshExecutor("feed-refresh-worker", threads, 20 * threads);
|
||||
pool = new FeedRefreshExecutor("feed-refresh-worker", threads, Math.min(20 * threads, 1000));
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
|
||||
Reference in New Issue
Block a user