Skip to content

Commit

Permalink
Update Logs and Message
Browse files Browse the repository at this point in the history
  • Loading branch information
mohityadav766 committed Sep 19, 2024
1 parent 1b38da1 commit 1917409
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ public void stopApplicationRun(App application) {
JobDetail jobDetailScheduled =
scheduler.getJobDetail(new JobKey(application.getName(), APPS_JOB_GROUP));
if (jobDetailScheduled != null) {
LOG.debug("Stopping Scheduled Execution for App : {}", application.getName());
scheduler.interrupt(jobDetailScheduled.getKey());
}

Expand All @@ -281,12 +282,11 @@ public void stopApplicationRun(App application) {
String.format("%s-%s", application.getName(), ON_DEMAND_JOB), APPS_JOB_GROUP));

if (jobDetailOnDemand != null) {
LOG.debug("Stopping On Demand Execution for App : {}", application.getName());
scheduler.interrupt(jobDetailOnDemand.getKey());
}
} catch (ObjectAlreadyExistsException ex) {
throw new UnhandledServerException("Job is already running, please wait for it to complete.");
} catch (SchedulerException ex) {
LOG.error("Failed in running job", ex);
} catch (Exception ex) {
LOG.error("Failed to stop job execution.", ex);
}
}
}

0 comments on commit 1917409

Please sign in to comment.