airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: Move Email based monitor to quite mode if no jobs in monitor map
Date Mon, 09 Nov 2015 21:00:42 GMT
Repository: airavata
Updated Branches:
  refs/heads/master f0705314a -> eb425a591


Move Email based monitor to quite mode if no jobs in monitor map


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

Branch: refs/heads/master
Commit: eb425a591bc93a76d06d29b950f5f4c4f8fd76a2
Parents: f070531
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Mon Nov 9 16:00:37 2015 -0500
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Mon Nov 9 16:00:37 2015 -0500

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


http://git-wip-us.apache.org/repos/asf/airavata/blob/eb425a59/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
index f983d63..7e9e505 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/monitor/email/EmailBasedMonitor.java
@@ -166,6 +166,7 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 
     @Override
     public void run() {
+        boolean quite = false;
 
 	    while (!stopMonitoring && !ServerSettings.isStopAllThreads()) {
 		    try {
@@ -178,9 +179,13 @@ public class EmailBasedMonitor implements JobMonitor, Runnable{
 			    while (!(stopMonitoring || ServerSettings.isStopAllThreads())) {
 				    Thread.sleep(ServerSettings.getEmailMonitorPeriod());// sleep a bit - get a rest
till job finishes
 				    if (jobMonitorMap.isEmpty()) {
-					    log.info("[EJM]: Job Monitor Map is empty, no need to retrieve emails");
+                        if (!quite) {
+                            log.info("[EJM]: Job Monitor Map is empty, no need to retrieve
emails");
+                        }
+                        quite = true;
 					    continue;
 				    } else {
+                        quite = false;
 					    log.info("[EJM]: " + jobMonitorMap.size() + " job/s in job monitor map");
 				    }
 				    if (!store.isConnected()) {


Mime
View raw message