airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: Added log messages for emaill notifications runs
Date Fri, 24 Apr 2015 20:37:05 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 96f04f4d2 -> 4f505cd57


Added log messages for emaill notifications runs


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/4f505cd5
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/4f505cd5
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/4f505cd5

Branch: refs/heads/master
Commit: 4f505cd575458883b738ebdd0e729900e9856422
Parents: 96f04f4
Author: shamrath <shameerainfo@gmail.com>
Authored: Fri Apr 24 16:37:02 2015 -0400
Committer: shamrath <shameerainfo@gmail.com>
Committed: Fri Apr 24 16:37:02 2015 -0400

----------------------------------------------------------------------
 .../apache/airavata/gfac/monitor/email/EmailBasedMonitor.java  | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/4f505cd5/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
index 7fcbda1..699184c 100644
--- a/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
+++ b/modules/gfac/gfac-monitor/gfac-email-monitor/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
@@ -154,8 +154,14 @@ public class EmailBasedMonitor implements Runnable{
                     emailFolder = store.getFolder(folderName);
                 }
                 Thread.sleep(ServerSettings.getEmailMonitorPeriod());// sleep a bit - get
rest till job finishes
+                log.info("Retrieving unseen emails");
                 emailFolder.open(Folder.READ_WRITE);
                 Message[] searchMessages = emailFolder.search(unseenBefore);
+                if (searchMessages == null || searchMessages.length == 0) {
+                    log.info("No new email messages");
+                } else {
+                    log.info(searchMessages.length + " new email/s received");
+                }
                 processMessages(searchMessages);
                 emailFolder.close(false);
             }


Mime
View raw message