airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject airavata git commit: set working directory according to staticWorkingdir
Date Tue, 06 Oct 2015 20:29:19 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 7275b3d50 -> ae208754b


set working directory according to staticWorkingdir


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

Branch: refs/heads/master
Commit: ae208754b7fda0e8b6b54e8772d8d61af6830709
Parents: 7275b3d
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Tue Oct 6 16:29:14 2015 -0400
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Tue Oct 6 16:29:14 2015 -0400

----------------------------------------------------------------------
 .../apache/airavata/gfac/core/context/ProcessContext.java | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/ae208754/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
index 8655142..c2f4d83 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
@@ -147,9 +147,13 @@ public class ProcessContext {
 
 	public String getWorkingDir() {
 		if (workingDir == null) {
-			String scratchLocation = computeResourcePreference.getScratchLocation();
-			workingDir = (scratchLocation.endsWith("/") ? scratchLocation + processId : scratchLocation
+ "/" +
-					processId);
+            if (processModel.getResourceSchedule().getStaticWorkingDir() != null){
+                workingDir = processModel.getResourceSchedule().getStaticWorkingDir();
+            }else {
+                String scratchLocation = computeResourcePreference.getScratchLocation();
+                workingDir = (scratchLocation.endsWith("/") ? scratchLocation + processId
: scratchLocation + "/" +
+                        processId);
+            }
 		}
 		return workingDir;
 	}


Mime
View raw message