airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dimuthu...@apache.org
Subject [airavata] branch staging updated: Fixing the bug of not accepting job id as a parameter in getJobs API
Date Fri, 18 Jan 2019 20:46:44 GMT
This is an automated email from the ASF dual-hosted git repository.

dimuthuupe pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/staging by this push:
     new 4f34b19  Fixing the bug of not accepting job id as a parameter in getJobs API
4f34b19 is described below

commit 4f34b19139245ff8ed4c3187f6fe3d4a5eae8a16
Author: Dimuthu Wannipurage <dimuthu.upeksha2@gmail.com>
AuthorDate: Fri Jan 18 15:46:36 2019 -0500

    Fixing the bug of not accepting job id as a parameter in getJobs API
---
 .../airavata/registry/api/service/handler/RegistryServerHandler.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
index 7b6ced5..5bacaf0 100644
--- a/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
+++ b/modules/registry/registry-server/registry-api-service/src/main/java/org/apache/airavata/registry/api/service/handler/RegistryServerHandler.java
@@ -1078,9 +1078,10 @@ public class RegistryServerHandler implements RegistryService.Iface
{
         List<Object> jobs = new ArrayList<>();
         if (queryType.equals(Constants.FieldConstants.JobConstants.TASK_ID)) {
             jobs = experimentCatalog.get(ExperimentCatalogModelType.JOB, Constants.FieldConstants.JobConstants.TASK_ID,
id);
-        }
-        else if (queryType.equals(Constants.FieldConstants.JobConstants.PROCESS_ID)) {
+        } else if (queryType.equals(Constants.FieldConstants.JobConstants.PROCESS_ID)) {
             jobs = experimentCatalog.get(ExperimentCatalogModelType.JOB, Constants.FieldConstants.JobConstants.PROCESS_ID,
id);
+        } else if (queryType.equals(Constants.FieldConstants.JobConstants.JOB_ID)) {
+            jobs = experimentCatalog.get(ExperimentCatalogModelType.JOB, Constants.FieldConstants.JobConstants.JOB_ID,
id);
         }
         return jobs.stream().map(obj -> (JobModel)obj).collect(Collectors.toList());
     }


Mime
View raw message