Skip to content

Commit

Permalink
fix(core): add predestroy to prevent Scheduler from crashing the whol…
Browse files Browse the repository at this point in the history
…e app when context stops
  • Loading branch information
brian-mulier-p committed Jul 24, 2023
1 parent 39877a8 commit 426814d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.kestra.core.utils.ListUtils;
import io.micronaut.context.ApplicationContext;
import io.micronaut.inject.qualifiers.Qualifiers;
import jakarta.annotation.PreDestroy;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down Expand Up @@ -588,6 +589,7 @@ private void sendPollingTriggerToWorker(FlowWithPollingTrigger flowWithTrigger)
}

@Override
@PreDestroy
public void close() {
this.scheduleExecutor.shutdown();
}
Expand Down

0 comments on commit 426814d

Please sign in to comment.