Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse older conversations, but only the most recent messages #498

wants to merge 1 commit into from
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -57,7 +57,7 @@ public boolean concurrentWith(WorkItem other) {
public void run(Path scratchPath) {
// Give the bot a chance to act on all found messages
var conversations = list.conversations(Duration.ofDays(60));
var conversations = list.conversations(Duration.ofDays(365));
for (var conversation : conversations) {
@@ -27,6 +27,7 @@
import org.openjdk.skara.forge.*;
import org.openjdk.skara.mailinglist.*;

import java.time.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.logging.Logger;
@@ -92,8 +93,10 @@ synchronized void inspect(Conversation conversation) {

// Are there any new messages?
// Are there any new messages? We avoid looking further back than 14 days. If the bridge has been down
// for more than 14 days, this may have to be temporarily increased.
var newMessages = conversation.allMessages().stream()
.filter(email ->
.filter(email -> !parsedEmailIds.contains(
if (newMessages.isEmpty()) {