Browse Source

now resetting imap errors after successfull job

drop_old_mail
Stephan Richter 3 years ago
parent
commit
3ffab25635
  1. 2
      pom.xml
  2. 9
      src/main/java/de/srsoftware/widerhall/data/MailingList.java
  3. 1
      src/main/java/de/srsoftware/widerhall/mail/ImapClient.java
  4. 2
      src/main/java/de/srsoftware/widerhall/mail/ProblemListener.java

2
pom.xml

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
<groupId>org.example</groupId>
<artifactId>Widerhall</artifactId>
<version>0.2.26</version>
<version>0.2.27</version>
<build>
<plugins>
<plugin>

9
src/main/java/de/srsoftware/widerhall/data/MailingList.java

@ -93,6 +93,15 @@ public class MailingList implements MessageHandler, ProblemListener { @@ -93,6 +93,15 @@ public class MailingList implements MessageHandler, ProblemListener {
return setFlag(STATE_PUBLIC_ARCHIVE,enabled);
}
@Override
public void clearProblems() {
try {
setLastError(null);
} catch (SQLException e) {
LOG.warn("setLastError(null) failed.");
}
}
/**
* create a new ML object int the database
* @param email

1
src/main/java/de/srsoftware/widerhall/mail/ImapClient.java

@ -65,6 +65,7 @@ public class ImapClient { @@ -65,6 +65,7 @@ public class ImapClient {
while (!stopped){
handleMessages();
problemListener.clearProblems();
LOG.debug("Idling.");
inbox.idle(true);
}

2
src/main/java/de/srsoftware/widerhall/mail/ProblemListener.java

@ -4,4 +4,6 @@ import javax.mail.MessagingException; @@ -4,4 +4,6 @@ import javax.mail.MessagingException;
public interface ProblemListener {
public void onImapException(MessagingException e);
public void clearProblems();
}

Loading…
Cancel
Save