airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject airavata git commit: qos and reservertions doesn't get by gateway compute resrouces if login name is given in user compute resource pref
Date Tue, 06 Dec 2016 21:52:41 GMT
Repository: airavata
Updated Branches:
  refs/heads/develop 5ba819bbb -> 0cc6ae66f


qos and reservertions doesn't get by gateway compute resrouces if login name is given in user
compute resource pref


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

Branch: refs/heads/develop
Commit: 0cc6ae66fbccbedc3a0fca44a449f26808aa6c96
Parents: 5ba819b
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Tue Dec 6 16:52:19 2016 -0500
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Tue Dec 6 16:52:33 2016 -0500

----------------------------------------------------------------------
 .../gfac/core/context/ProcessContext.java       | 22 ++++++++++----------
 1 file changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/0cc6ae66/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 00598f2..f875437 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
@@ -602,30 +602,30 @@ public class ProcessContext {
 	}
 
 	public String getReservation() {
-		long start, end ;
+		long start = 0, end = 0;
 		String reservation = null;
-		if (isUseUserCRPref() && isValid(userComputeResourcePreference.getReservation()))
{
-			reservation = userComputeResourcePreference.getReservation();
-			start = userComputeResourcePreference.getReservationStartTime();
-			end = userComputeResourcePreference.getReservationEndTime();
-		}else {
+		if (isUseUserCRPref() && isValid(userComputeResourcePreference.getLoginUserName()))
{
+			if (isValid(userComputeResourcePreference.getReservation())) {
+				reservation = userComputeResourcePreference.getReservation();
+				start = userComputeResourcePreference.getReservationStartTime();
+				end = userComputeResourcePreference.getReservationEndTime();
+			}
+		} else {
 			reservation = gatewayComputeResourcePreference.getReservation();
 			start = gatewayComputeResourcePreference.getReservationStartTime();
 			end = gatewayComputeResourcePreference.getReservationEndTime();
 		}
-		if (start > 0 && start < end) {
+		if (reservation != null && start > 0 && start < end) {
 			long now = Calendar.getInstance().getTimeInMillis();
 			if (now > start && now < end) {
 				return reservation;
 			}
-		} else {
-			return reservation;
 		}
-		return reservation;
+		return null;
 	}
 
 	public String getQualityOfService() {
-		if (isUseUserCRPref() && isValid(userComputeResourcePreference.getQualityOfService()))
{
+		if (isUseUserCRPref() && isValid(userComputeResourcePreference.getLoginUserName()))
{
 			return userComputeResourcePreference.getQualityOfService();
 		} else {
 			return gatewayComputeResourcePreference.getQualityOfService();


Mime
View raw message