Skip to content

Commit

Permalink
reactivated batch services
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunlumbcgov committed Oct 15, 2024
1 parent 1cf5eb0 commit 4079474
Showing 1 changed file with 31 additions and 85 deletions.
116 changes: 31 additions & 85 deletions frontend/src/services/BatchProcessingService.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,62 +59,35 @@ export default {
return
}else{
if(credentialType == "OT"){
console.log("/api/v1/batch/userrequestdisrun/OT");
console.log(request)
return;
// return ApiService.apiAxios.post('/api/v1/batch/userrequestdisrun/OT', request);
return ApiService.apiAxios.post('/api/v1/batch/userrequestdisrun/OT', request);
}else if(credentialType == "OC"){
console.log("/api/v1/batch/userrequestdisrun/OC");
console.log(request);
return;
// return ApiService.apiAxios.post('/api/v1/batch/userrequestdisrun/OC', request);
return ApiService.apiAxios.post('/api/v1/batch/userrequestdisrun/OC', request);
}else if(credentialType == "RC"){
console.log("/api/v1/batch/userrequestdisrun/RC");
console.log(request);
return;
// return ApiService.apiAxios.post('/api/v1/batch/userrequestdisrun/RC', request);
return ApiService.apiAxios.post('/api/v1/batch/userrequestdisrun/RC', request);
}else if(credentialType == "Blank transcript print"){
console.log("/api/v1/batch/userrequestblankdisrun/OT");
console.log(request);
return;
// return ApiService.apiAxios.post('/api/v1/batch/userrequestblankdisrun/OT', request);
return ApiService.apiAxios.post('/api/v1/batch/userrequestblankdisrun/OT', request);
}else if(credentialType == "Blank certificate print"){
console.log("userrequestblankdisrun/OC");
console.log(request);
return;
// return ApiService.apiAxios.post('/api/v1/batch/userrequestblankdisrun/OC', request);
return ApiService.apiAxios.post('/api/v1/batch/userrequestblankdisrun/OC', request);
}
}


},
runDISTRUN_MONTHLY(){
console.log("/api/v1/batch/executedisrunbatchjob");
console.log(request);
return;
// return ApiService.apiAxios.get('/api/v1/batch/executedisrunbatchjob');
return ApiService.apiAxios.get('/api/v1/batch/executedisrunbatchjob');
},
runSCHL_RPT_REGEN(request, cronTime=""){
console.log(`/api/v1/batch/regenerate/school-report`)
console.log(request)
return;
// return ApiService.apiAxios.post(`/api/v1/batch/regenerate/school-report`,request);
return ApiService.apiAxios.post(`/api/v1/batch/regenerate/school-report`,request);
},
runDISTRUN_SUPP(){
console.log("/api/v1/batch/executesuppdisrunbatchjob");
console.log(request);
return;
// return ApiService.apiAxios.get('/api/v1/batch/executesuppdisrunbatchjob');
return ApiService.apiAxios.get('/api/v1/batch/executesuppdisrunbatchjob');
},
runNONGRADRUN(request, cronTime=""){
if (Array.isArray(request.districts) && request.districts.length === 1 && request.districts[0].toLowerCase() === "all") {
// If the condition is true, set districts to an empty array
request.districts = [];
}
console.log("/api/v1/batch/executenongraddisrunbatchjob");
console.log(request);
return;
// return ApiService.apiAxios.post('/api/v1/batch/executenongraddisrunbatchjob',request);
return ApiService.apiAxios.post('/api/v1/batch/executenongraddisrunbatchjob',request);
},
runDISTRUN_YE(request, cronTime=""){
if (Array.isArray(request.districts) && request.districts.length === 1 && request.districts[0].toLowerCase() === "all") {
Expand All @@ -130,20 +103,14 @@ export default {
this.addScheduledJob(scheduledRequest);
return
}else{
console.log("/api/v1/batch/executeyearlydisrunbatchjob");
console.log(request);
return;
// return ApiService.apiAxios.post('/api/v1/batch/executeyearlydisrunbatchjob', request);
return ApiService.apiAxios.post('/api/v1/batch/executeyearlydisrunbatchjob', request);
}
},
runBlankDISTRUNUSERUserRequest(request, credentialType) {
console.log("/api/v1/batch/userrequestblankdisrun/" + credentialType)
console.log(request)
return;
// return ApiService.apiAxios.post(
// "/api/v1/batch/userrequestblankdisrun/" + credentialType,
// request
// );
return ApiService.apiAxios.post(
"/api/v1/batch/userrequestblankdisrun/" + credentialType,
request
);
},
runSCHL_RPT_REGEN(request, cronTime=""){
if (cronTime) {
Expand All @@ -154,18 +121,13 @@ export default {
scheduledRequest.payload = request;
this.addScheduledJob(scheduledRequest, id);
} else {
console.log("/api/v1/batch/regenerate/school-report");
console.log(request);
return;
// return ApiService.apiAxios.post(`/api/v1/batch/regenerate/school-report`,request);
return ApiService.apiAxios.post(`/api/v1/batch/regenerate/school-report`,request);
}

},
runDISTRUN_SUPP() {
console.log("/api/v1/batch/executesuppdisrunbatchjob");
console.log(request);
return;
// return ApiService.apiAxios.get("/api/v1/batch/executesuppdisrunbatchjob");

return ApiService.apiAxios.get("/api/v1/batch/executesuppdisrunbatchjob");
},
runCERTREGEN(request, cronTime = "") {
if (
Expand All @@ -185,13 +147,10 @@ export default {
this.addScheduledJob(scheduledRequest);
return;
} else {
console.log("/api/v1/batch/executecertregenbatchjob");
console.log(request);
return;
// return ApiService.apiAxios.post(
// "/api/v1/batch/executecertregenbatchjob",
// request
// );
return ApiService.apiAxios.post(
"/api/v1/batch/executecertregenbatchjob",
request
);
}
},
runTVR_DELETE(request, cronTime="" ) {
Expand All @@ -205,13 +164,10 @@ export default {
scheduledRequest.psiPayload = null;
this.addScheduledJob(scheduledRequest);
}else{
console.log("/api/v1/batch/report/student/delete");
console.log(request);
return;
// return ApiService.apiAxios.post(
// "/api/v1/batch/report/student/delete",
// request
// );
return ApiService.apiAxios.post(
"/api/v1/batch/report/student/delete",
request
);
}
},
runArchiveStudents(request, cronTime = "") {
Expand All @@ -224,10 +180,7 @@ export default {
this.addScheduledJob(scheduledRequest);
return;
} else {
console.log("/api/v1/batch/student/archive");
console.log(request);
return;
// return ApiService.apiAxios.post("/api/v1/batch/student/archive", request);
return ApiService.apiAxios.post("/api/v1/batch/student/archive", request);
}
},
runArchiveSchoolReports(request, cronTime = "") {
Expand All @@ -240,13 +193,10 @@ export default {
this.addScheduledJob(scheduledRequest);
return;
} else {
console.log("/api/v1/batch/report/school/archive");
console.log(request);
return;
// return ApiService.apiAxios.post(
// "/api/v1/batch/report/school/archive",
// request
// );
return ApiService.apiAxios.post(
"/api/v1/batch/report/school/archive",
request
);
}
},
runPSIRun(request, transmissionType, cronTime=""){
Expand All @@ -259,11 +209,7 @@ export default {
this.addScheduledJob(scheduledRequest);
return;
} else {
console.log('/api/v1/batch/executepsireportbatchjob/' + transmissionType);
console.log(request);
return;
// return ApiService.apiAxios.post('/api/v1/batch/executepsireportbatchjob/' + transmissionType, request);

return ApiService.apiAxios.post('/api/v1/batch/executepsireportbatchjob/' + transmissionType, request);
}
},
getBatchErrors(id, page) {
Expand Down

0 comments on commit 4079474

Please sign in to comment.