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 more log info to email based monitoring class
Date Fri, 24 Apr 2015 22:14:56 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 4f505cd57 -> a6d876e9c


Added more log info to email based monitoring class


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

Branch: refs/heads/master
Commit: a6d876e9c5a9695ecdedbf096055aad43f780f49
Parents: 4f505cd
Author: shamrath <shameerainfo@gmail.com>
Authored: Fri Apr 24 18:14:54 2015 -0400
Committer: shamrath <shameerainfo@gmail.com>
Committed: Fri Apr 24 18:14:54 2015 -0400

----------------------------------------------------------------------
 .../airavata/gfac/monitor/email/EmailBasedMonitor.java | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/a6d876e9/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 699184c..5c9bc24 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
@@ -245,29 +245,34 @@ public class EmailBasedMonitor implements Runnable{
         JobState resultState = jobStatusResult.getState();
         jEC.getJobDetails().setJobStatus(new JobStatus(resultState));
         boolean runOutHandlers = false;
+        String jobDetails = "JobName : " + jobStatusResult.getJobName() + ", JobId : " +
jobStatusResult.getJobId();
         // TODO - Handle all other valid JobStates
         if (resultState == JobState.COMPLETE) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
             runOutHandlers = true;
-            log.debug("Job Complete email received , removed job from job monitoring");
+            log.info("Job Complete email received , removed job from job monitoring. " +
jobDetails);
         }else if (resultState == JobState.QUEUED) {
             // nothing special thing to do, update the status change to rabbit mq at the
end of this method.
+            log.info("Job Queued email received, " + jobDetails);
         }else if (resultState == JobState.ACTIVE) {
             // nothing special thing to do, update the status change to rabbit mq at the
end of this method.
+            log.info("Job Active email received, " + jobDetails);
         }else if (resultState == JobState.FAILED) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
             runOutHandlers = true;
-            log.debug("Job failed email received , removed job from job monitoring");
+            log.info("Job failed email received , removed job from job monitoring. " + jobDetails);
         }else if (resultState == JobState.CANCELED) {
             jobMonitorMap.remove(jobStatusResult.getJobId());
             runOutHandlers = true;
-            log.debug("Job canceled mail received, removed job from job monitoring");
+            log.info("Job canceled mail received, removed job from job monitoring. " + jobDetails);
             
         }
 
         if (runOutHandlers) {
-                GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(jEC,
BetterGfacImpl.getMonitorPublisher()));
+            log.info("Calling Out Handler chain of " + jobDetails);
+            GFacThreadPoolExecutor.getCachedThreadPool().execute(new OutHandlerWorker(jEC,
BetterGfacImpl.getMonitorPublisher()));
         }
+        log.info("Publishing status changes to amqp. " + jobDetails);
         publishJobStatusChange(jEC);
     }
 


Mime
View raw message