airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [1/2] airavata git commit: Fixed JobDetails saving issue.
Date Tue, 12 May 2015 15:45:47 GMT
Repository: airavata
Updated Branches:
  refs/heads/master cdf979905 -> 9a8a14b9f


Fixed JobDetails saving issue.


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

Branch: refs/heads/master
Commit: d2afa76fb0eedce88c9eff7d3c107aa114cfd0e6
Parents: badaa73
Author: shamrath <shameerainfo@gmail.com>
Authored: Tue May 12 11:38:15 2015 -0400
Committer: shamrath <shameerainfo@gmail.com>
Committed: Tue May 12 11:38:15 2015 -0400

----------------------------------------------------------------------
 .../org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/d2afa76f/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
index 2a3287b..31ec261 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/provider/impl/SSHProvider.java
@@ -169,23 +169,24 @@ public class SSHProvider extends AbstractProvider {
 
                     String jobID = cluster.submitBatchJob(jobDescriptor);
                     if (jobID != null) {
+                        jobDetails.setJobID(jobID);
                         GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.SUBMITTED);
                     }
                     jobExecutionContext.setJobDetails(jobDetails);
                     String verifyJobId = verifyJobSubmission(cluster, jobDetails);
                     if (verifyJobId != null) {
                         // JobStatus either changed from SUBMITTED to QUEUED or directly
to QUEUED
-                        GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.QUEUED);
                         if (jobID == null) {
                             jobID = verifyJobId;
+                            jobDetails.setJobID(jobID);
                         }
+                        GFacUtils.saveJobStatus(jobExecutionContext, jobDetails, JobState.QUEUED);
                     }
                     if (jobID == null) {
                         log.error("Couldn't find remote jobId for JobName:" + jobDetails.getJobName()
+ ", ExperimentId:" + jobExecutionContext.getExperimentID());
                         GFacUtils.updateExperimentStatus(jobExecutionContext.getExperimentID(),
ExperimentState.FAILED);
                         return;
                     }
-                    jobDetails.setJobID(jobID);
                     data.append("jobDesc=").append(jobDescriptor.toXML());
                     data.append(",jobId=").append(jobDetails.getJobID());
                     delegateToMonitorHandlers(jobExecutionContext);


Mime
View raw message