You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sc...@apache.org on 2015/06/30 17:51:38 UTC

[1/2] airavata-php-gateway git commit: invalidating cached app interface and CR values when updating/deleting

Repository: airavata-php-gateway
Updated Branches:
  refs/heads/airavata-php-gateway-0.15-release 07664c6c5 -> a411b2b20


invalidating cached app interface and CR values when updating/deleting


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

Branch: refs/heads/airavata-php-gateway-0.15-release
Commit: 76e9c65c9025c990ac2ed6e15e0b21b97b450ddd
Parents: 07664c6
Author: Supun Nakandala <sc...@apache.org>
Authored: Tue Jun 30 15:49:03 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Tue Jun 30 15:49:27 2015 +0530

----------------------------------------------------------------------
 app/libraries/CRUtilities.php | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/76e9c65c/app/libraries/CRUtilities.php
----------------------------------------------------------------------
diff --git a/app/libraries/CRUtilities.php b/app/libraries/CRUtilities.php
index 6e37cc6..16df103 100755
--- a/app/libraries/CRUtilities.php
+++ b/app/libraries/CRUtilities.php
@@ -106,6 +106,11 @@ class CRUtilities
 
     public static function deleteQueue($computeResourceId, $queueName)
     {
+        if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
+            if (Cache::has('CR-' . $computeResourceId)) {
+                Cache::forget('CR-' . $computeResourceId);
+            }
+        }
         Airavata::deleteBatchQueue($computeResourceId, $queueName);
     }
 
@@ -119,6 +124,11 @@ class CRUtilities
 
         $computeResource = CRUtilities::get_compute_resource($inputs["crId"]);
 
+        if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
+            if (Cache::has('CR-' . $inputs["crId"])) {
+                Cache::forget('CR-' . $inputs["crId"]);
+            }
+        }
 
         $jsiId = null;
         if (isset($inputs["jsiId"]))
@@ -220,6 +230,13 @@ class CRUtilities
     {
 
         $computeResource = CRUtilities::get_compute_resource($inputs["crId"]);
+
+        if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
+            if (Cache::has('CR-' . $inputs["crId"])) {
+                Cache::forget('CR-' . $inputs["crId"]);
+            }
+        }
+
         if ($inputs["dataMovementProtocol"] == DataMovementProtocol::LOCAL) /* LOCAL */ {
             $localDataMovement = new LOCALDataMovement();
             $localdmp = Airavata::addLocalDataMovementDetails($computeResource->computeResourceId, 0, $localDataMovement);
@@ -326,6 +343,20 @@ class CRUtilities
 
     public static function deleteActions($inputs)
     {
+        if (isset($inputs["crId"])) {
+            if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
+                if (Cache::has('CR-' . $inputs["crId"])) {
+                    Cache::forget('CR-' . $inputs["crId"]);
+                }
+            }
+        } elseif (isset($inputs["del-crId"])) {
+            if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
+                if (Cache::has('CR-' . $inputs["del-crId"])) {
+                    Cache::forget('CR-' . $inputs["del-crId"]);
+                }
+            }
+        }
+
         if (isset($inputs["jsiId"]))
             if (Airavata::deleteJobSubmissionInterface($inputs["crId"], $inputs["jsiId"]))
                 return 1;
@@ -400,6 +431,12 @@ class CRUtilities
     {
         $computeResourcePreferences = new computeResourcePreference($inputs);
 
+        if (Config::get('pga_config.airavata')['enable-app-catalog-cache']) {
+            if (Cache::has('CR-' . $inputs["computeResourceId"])) {
+                Cache::forget('CR-' . $inputs["computeResourceId"]);
+            }
+        }
+
         //var_dump( $inputs); exit;
         return Airavata::addGatewayComputeResourcePreference($inputs["gatewayId"], $inputs["computeResourceId"], $computeResourcePreferences);
 
@@ -418,6 +455,7 @@ class CRUtilities
                 Cache::forget('CR-' . $id);
             }
         }
+
         return Airavata::deleteGatewayComputeResourcePreference($inputs["gpId"], $inputs["rem-crId"]);
     }
 


[2/2] airavata-php-gateway git commit: fixing AIRAVATA-1741

Posted by sc...@apache.org.
fixing AIRAVATA-1741


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

Branch: refs/heads/airavata-php-gateway-0.15-release
Commit: a411b2b20024760743a801bc247267a9192b3392
Parents: 76e9c65
Author: Supun Nakandala <sc...@apache.org>
Authored: Tue Jun 30 17:01:10 2015 +0530
Committer: Supun Nakandala <sc...@apache.org>
Committed: Tue Jun 30 17:01:10 2015 +0530

----------------------------------------------------------------------
 app/views/project/summary.blade.php | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/a411b2b2/app/views/project/summary.blade.php
----------------------------------------------------------------------
diff --git a/app/views/project/summary.blade.php b/app/views/project/summary.blade.php
index aeb6579..6501686 100755
--- a/app/views/project/summary.blade.php
+++ b/app/views/project/summary.blade.php
@@ -72,8 +72,17 @@
 
         echo "<td>$applicationInterface->applicationName</td>";
 
-        echo '<td>' . CRUtilities::get_compute_resource($experiment->userConfigurationData
-                ->computationalResourceScheduling->resourceHostId)->hostName . '</td>';
+        echo '<td>';
+        try {
+            $cr = CRUtilities::get_compute_resource($experiment->userConfigurationData
+                ->computationalResourceScheduling->resourceHostId);
+            if (!empty($cr)) {
+                echo $cr->hostName;
+            }
+        } catch (Exception $ex) {
+            //Error while retrieving the CR
+        }
+        echo '</td>';
         echo '<td class="time" unix-time="' . $expValues["experimentTimeOfStateChange"] . '"></td>';