mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Pass executor to scheduler.
This commit is contained in:
@@ -146,9 +146,8 @@ class FeedManagerImpl implements FeedManager, EventListener, OpenDatabaseHook,
|
||||
private void startFeedExecutor() {
|
||||
if (fetcherStarted.getAndSet(true)) return;
|
||||
LOG.info("Tor started, scheduling RSS feed fetcher");
|
||||
Runnable fetcher = () -> ioExecutor.execute(this::fetchFeeds);
|
||||
scheduler.scheduleWithFixedDelay(fetcher, FETCH_DELAY_INITIAL,
|
||||
FETCH_INTERVAL, FETCH_UNIT);
|
||||
scheduler.scheduleWithFixedDelay(this::fetchFeeds, ioExecutor,
|
||||
FETCH_DELAY_INITIAL, FETCH_INTERVAL, FETCH_UNIT);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -471,6 +470,7 @@ class FeedManagerImpl implements FeedManager, EventListener, OpenDatabaseHook,
|
||||
if (date == null) time = now;
|
||||
else time = Math.max(0, Math.min(date.getTime(), now));
|
||||
String text = getPostText(b.toString());
|
||||
//noinspection TryWithIdenticalCatches
|
||||
try {
|
||||
// create and store post
|
||||
LocalAuthor localAuthor = feed.getLocalAuthor();
|
||||
|
||||
Reference in New Issue
Block a user