git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-analysis/dataminer-pool-manager@151268 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
3eb0ef1065
commit
8b055202c8
|
@ -45,9 +45,11 @@ public class ProductionPublishingJob extends DMPMJob {
|
|||
this.svnUpdater.updateSVNProdAlgorithmList(this.algorithm, this.targetVREName, this.algorithm.getFullname(), "Prod");
|
||||
this.getStatus(9);
|
||||
sm.sendNotification(nh.getSuccessSubjectRelease() + " for "+this.algorithm.getName()+ " algorithm", nh.getSuccessBodyRelease(this.buildInfo()));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
else this.getStatus(0);
|
||||
sm.sendNotification(nh.getFailedSubjectRelease() + " for "+this.algorithm.getName()+ " algorithm", nh.getFailedBodyRelease(this.buildInfo()+" The user "+this.algorithm.getFullname()+ " is not authorized to access to the "+ targetVREName+ " VRE"));
|
||||
return;
|
||||
// int ret = this.executeAnsibleWorker(
|
||||
// createWorker(this.algorithm, this.prodCluster, false, "gcube"));
|
||||
|
||||
|
@ -59,7 +61,7 @@ public class ProductionPublishingJob extends DMPMJob {
|
|||
|
||||
public String getStatus(int exitstatus) throws FileNotFoundException, UnsupportedEncodingException {
|
||||
|
||||
File m = new File(this.jobLogs + File.separator + this.id);
|
||||
File m = new File(this.jobLogs + File.separator + this.id+"_exitStatus");
|
||||
PrintWriter writer = new PrintWriter(m, "UTF-8");
|
||||
|
||||
String response = "";
|
||||
|
@ -68,6 +70,14 @@ public class ProductionPublishingJob extends DMPMJob {
|
|||
response = "SVN REPOSITORY CORRECTLY UPDATED; THE CRON JOB WILL INSTALL THE ALGORITHM "+ this.algorithm.getName() + " IN THE VRE" + targetVREName;
|
||||
writer.println(response);
|
||||
}
|
||||
|
||||
if (exitstatus == 0) {
|
||||
response = "SVN REPOSITORY UPDATE FAI; THE CRON JOB WILL NOT BE ABLE TO INSTALL THE ALGORITHM "+this.algorithm.getName()+" IN THE VRE" + targetVREName;;
|
||||
writer.println(response);
|
||||
//writer.close();
|
||||
}
|
||||
|
||||
|
||||
writer.close();
|
||||
return response;
|
||||
}
|
||||
|
|
|
@ -66,6 +66,12 @@ public class NotificationHelper {
|
|||
return message;
|
||||
}
|
||||
|
||||
public String getFailedBodyRelease(String info) {
|
||||
String message = String.format("SVN REPOSITORY UPDATE FAILED.");
|
||||
message+="\n\n The CRON job will NOT be able to install the algorithm in the target VRE \n\n"+ info;
|
||||
return message;
|
||||
}
|
||||
|
||||
// public String getSubject() {
|
||||
// if(this.isError()) {
|
||||
// return this.getFailedSubject();
|
||||
|
|
Loading…
Reference in New Issue