Skip to content

Commit

Permalink
avniproject/avni-infra#41 | rename pathVariable
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Nov 18, 2024
1 parent 0c6b566 commit 70acf8a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ private String getTruncatedDescription(OrganisationIdentity organisationIdentity
}

@PreAuthorize("hasAnyAuthority('admin')")
@DeleteMapping(value = "/job/{id}")
public String deleteJob(@PathVariable String id, @RequestParam(value="jobGroup", required = false) JobGroup jobGroup) throws SchedulerException {
boolean syncJobDeleted = scheduler.deleteJob(scheduledJobConfig.getJobKey(id, jobGroup != null ? jobGroup : JobGroup.Sync));
@DeleteMapping(value = "/job/{entityUUID}")
public String deleteJob(@PathVariable String entityUUID, @RequestParam(value="jobGroup", required = false) JobGroup jobGroup) throws SchedulerException {
boolean syncJobDeleted = scheduler.deleteJob(scheduledJobConfig.getJobKey(entityUUID, jobGroup != null ? jobGroup : JobGroup.Sync));
String responseMsg = String.format("Sync Job Deleted: %s; ",syncJobDeleted);
if (jobGroup != null && jobGroup == JobGroup.Sync) {
EtlJobSummary mediaJobRun = scheduledJobService.getLatestJobRun(id, JobGroup.MediaAnalysis);
EtlJobSummary mediaJobRun = scheduledJobService.getLatestJobRun(entityUUID, JobGroup.MediaAnalysis);
if (mediaJobRun != null) {
boolean mediaAnalysisJobDeleted = scheduler.deleteJob(scheduledJobConfig.getJobKey(id, JobGroup.MediaAnalysis));
boolean mediaAnalysisJobDeleted = scheduler.deleteJob(scheduledJobConfig.getJobKey(entityUUID, JobGroup.MediaAnalysis));
responseMsg.concat(String.format("MediaAnalysis Job Deleted: %s;", mediaAnalysisJobDeleted));
}
}
Expand Down

0 comments on commit 70acf8a

Please sign in to comment.