diff --git a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/StagingJob.java b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/StagingJob.java index f98a270..0d6350d 100644 --- a/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/StagingJob.java +++ b/src/main/java/org/gcube/dataanalysis/dataminer/poolmanager/service/StagingJob.java @@ -38,13 +38,12 @@ public class StagingJob extends DMPMJob { this.stagingCluster = stagingCluster; ***REMOVED*** this.rProtoCluster = rProtoCluster; this.rProtoVREName = rProtoVREName; - - + File m = new File(this.jobLogs + File.separator + this.id + "_exitStatus"); PrintWriter writer = new PrintWriter(m, "UTF-8"); writer.println(this.getStatus(0)); writer.close(); - + ***REMOVED*** @Override @@ -73,16 +72,11 @@ public class StagingJob extends DMPMJob { int ret = this.executeAnsibleWorker(createWorker(this.algorithm, this.stagingCluster, false, "root")); -***REMOVED*** Integer s = null; -***REMOVED*** s = Integer.valueOf(ret); -***REMOVED*** -***REMOVED*** if (s == null) { -***REMOVED*** this.getStatus(0); -***REMOVED*** ***REMOVED*** if (ret != 0) { this.getStatus(2); sm.sendNotification(nh.getFailedSubject(), nh.getFailedBody("Installation failed. Return code=" + ret)); + return; ***REMOVED*** if (ret == 0) { @@ -90,21 +84,25 @@ public class StagingJob extends DMPMJob { if (b.checkMethod(a.getStagingHost(), SecurityTokenProvider.instance.get()) && (b.algoExists(this.algorithm))) { - + System.out.println("Interface check ok!"); System.out.println("Both the files exist at the correct path!"); - + this.svnUpdater.updateSVNRProtoAlgorithmList(this.algorithm, this.rProtoVREName, this.algorithm.getFullname(), "Proto"); - + this.getStatus(9); sm.sendNotification(nh.getSuccessSubject(), nh.getSuccessBody()); + return; ***REMOVED*** else this.getStatus(2); sm.sendNotification(nh.getFailedSubject(), - nh.getFailedBody("Installation completed but DataMiner Interface not working correctly or files " + this.algorithm.getName() - + ".jar and " + this.algorithm.getName() - + "_interface.jar not availables at the expected path")); + nh.getFailedBody( + "Installation completed but DataMiner Interface not working correctly or files " + + this.algorithm.getName() + ".jar and " + this.algorithm.getName() + + "_interface.jar not availables at the expected path")); + return; + ***REMOVED*** ***REMOVED*** catch (Exception e) { e.printStackTrace();