Skip to content

Commit

Permalink
Removing synchronized on getting list.
Browse files Browse the repository at this point in the history
Changing code to catch throwable.
  • Loading branch information
rbpark committed Mar 20, 2012
1 parent 514fb87 commit e215921
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void run()
try {
job.run();
}
catch (Exception e) {
catch (Throwable e) {
synchronized (sync) {
jobState = Status.FAILED;
returnProps = new Props();
Expand Down
8 changes: 5 additions & 3 deletions azkaban/src/java/azkaban/scheduler/ScheduleManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,17 @@ public void shutdown() {
this.runner.shutdown();
}



/**
* Retrieves a copy of the list of schedules.
*
* @return
*/
public synchronized List<ScheduledJob> getSchedule() {
private List<ScheduledJob> getSchedule() {
return runner.getSchedule();
}

/**
* Returns the scheduled job for the job name
*
Expand Down Expand Up @@ -178,7 +180,7 @@ public void shutdown() {
* Return a list of scheduled job
* @return
*/
public synchronized List<ScheduledJob> getSchedule() {
public List<ScheduledJob> getSchedule() {
return new ArrayList<ScheduledJob>(schedule);
}

Expand Down

0 comments on commit e215921

Please sign in to comment.