File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -608,6 +608,24 @@ You can change the log style using the `errorLogStyle` configuration option as i
608608export class HealthModule {}
609609```
610610
611+ #### Graceful shutdown timeout
612+
613+ If your application requires postponing its shutdown process, Terminus can be handle it for you.
614+ This setting can prove particularly beneficial when working with an orchestrator such as Kubernetes.
615+ By setting a delay slightly longer than the readiness check interval, you can achieve zero downtime when shutting down containers.
616+
617+ ``` typescript
618+ @@filename (health .module )
619+ @Module ({
620+ imports: [
621+ TerminusModule .forRoot ({
622+ gracefulShutdownTimeoutMs: 1000 ,
623+ }),
624+ ]
625+ })
626+ export class HealthModule {}
627+ ```
628+
611629#### More examples
612630
613631More working examples are available [ here] ( https://github.com/nestjs/terminus/tree/master/sample ) .
You can’t perform that action at this time.
0 commit comments