This is an automated email from the ASF dual-hosted git repository.
yasith pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/master by this push:
new 3e5e491d75 fix template path bug
3e5e491d75 is described below
commit 3e5e491d75617ac46aa8b6e9f067d60c16d7325a
Author: yasithdev <[email protected]>
AuthorDate: Mon Jul 14 18:09:04 2025 -0500
fix template path bug
---
.../impl/task/submission/config/JobFactory.java | 28 ++++++++--------------
1 file changed, 10 insertions(+), 18 deletions(-)
diff --git
a/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/submission/config/JobFactory.java
b/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/submission/config/JobFactory.java
index 3eed223f16..a0f9890b15 100644
---
a/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/submission/config/JobFactory.java
+++
b/airavata-api/src/main/java/org/apache/airavata/helix/impl/task/submission/config/JobFactory.java
@@ -32,24 +32,16 @@ public class JobFactory {
private static final Logger logger =
LoggerFactory.getLogger(JobFactory.class);
public static String getTemplateFileName(ResourceJobManagerType
resourceJobManagerType) {
- switch (resourceJobManagerType) {
- case FORK:
- return "templates/FORK_Groovy.template";
- case PBS:
- return "templates/PBS_Groovy.template";
- case SLURM:
- return "templates/SLURM_Groovy.template";
- case UGE:
- return "templates/UGE_Groovy.template";
- case LSF:
- return "templates/LSF_Groovy.template";
- case CLOUD:
- return "templates/CLOUD_Groovy.template";
- case HTCONDOR:
- return "templates/HTCONDOR_Groovy.template";
- default:
- return null;
- }
+ return switch (resourceJobManagerType) {
+ case FORK -> "FORK_Groovy.template";
+ case PBS -> "PBS_Groovy.template";
+ case SLURM -> "SLURM_Groovy.template";
+ case UGE -> "UGE_Groovy.template";
+ case LSF -> "LSF_Groovy.template";
+ case CLOUD -> "CLOUD_Groovy.template";
+ case HTCONDOR -> "HTCONDOR_Groovy.template";
+ default -> null;
+ };
}
public static ResourceJobManager getResourceJobManager(