now resetting imap errors after successfull job
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.example</groupId>
|
<groupId>org.example</groupId>
|
||||||
<artifactId>Widerhall</artifactId>
|
<artifactId>Widerhall</artifactId>
|
||||||
<version>0.2.26</version>
|
<version>0.2.27</version>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@@ -93,6 +93,15 @@ public class MailingList implements MessageHandler, ProblemListener {
|
|||||||
return setFlag(STATE_PUBLIC_ARCHIVE,enabled);
|
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
|
* create a new ML object int the database
|
||||||
* @param email
|
* @param email
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public class ImapClient {
|
|||||||
|
|
||||||
while (!stopped){
|
while (!stopped){
|
||||||
handleMessages();
|
handleMessages();
|
||||||
|
problemListener.clearProblems();
|
||||||
LOG.debug("Idling.");
|
LOG.debug("Idling.");
|
||||||
inbox.idle(true);
|
inbox.idle(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,6 @@ import javax.mail.MessagingException;
|
|||||||
|
|
||||||
public interface ProblemListener {
|
public interface ProblemListener {
|
||||||
public void onImapException(MessagingException e);
|
public void onImapException(MessagingException e);
|
||||||
|
|
||||||
|
public void clearProblems();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user