-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
status: waiting-for-reporterIssues for which we are waiting for feedback from the reporterIssues for which we are waiting for feedback from the reportertype: bug
Milestone
Description
Hi All,
i have a job that run on k8s. During a shutdown for a cluster update k8s send SIGTERM to my container.
My goal is to
- handle sigterm in a function
- in this function i want to call stop job and wait the termination
I m able to add a shutdown hook using
Runtime.getRuntime().addShutdownHook(new Thread() {
but in the meanwhile spring batch automatically terminate when i receive SIGTERM and the job remains in STARTED status on the db.
How can customize this behavior ? i want to stop correctly the job when i receive sigterm
hpoettker, Jacopo47 and MarceloLeite2604
Metadata
Metadata
Assignees
Labels
status: waiting-for-reporterIssues for which we are waiting for feedback from the reporterIssues for which we are waiting for feedback from the reportertype: bug