Skip to content

Commit

Permalink
FlintStreamingJobCleanerTask Implementation (opensearch-project#2574)
Browse files Browse the repository at this point in the history
Signed-off-by: Vamsi Manohar <[email protected]>
  • Loading branch information
vamsimanohar authored Mar 20, 2024
1 parent 4dc83b7 commit 284a0be
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,18 @@ public void beforeStop() {
}
});
}
initializeStreamingJobHouseKeeperCron();

if (flintStreamingJobHouseKeeperCron == null) {
initializeStreamingJobHouseKeeperCron();
clusterService.addLifecycleListener(
new LifecycleListener() {
@Override
public void beforeStop() {
cancel(flintStreamingJobHouseKeeperCron);
flintStreamingJobHouseKeeperCron = null;
}
});
}
}

private void initializeStreamingJobHouseKeeperCron() {
Expand Down

0 comments on commit 284a0be

Please sign in to comment.