refactor: enhance StopGracePeriod handling in database builders

- Updated the condition for StopGracePeriod in various database builder files to check for null and undefined values, improving code robustness and clarity.
This commit is contained in:
Mauricio Siu
2025-11-29 01:07:22 -06:00
parent aa750be036
commit a72281c018
6 changed files with 12 additions and 6 deletions

View File

@@ -121,7 +121,8 @@ ${command ?? "wait $MONGOD_PID"}`;
Image: dockerImage,
Env: envVariables,
Mounts: [...volumesMount, ...bindsMount, ...filesMount],
...(StopGracePeriod && { StopGracePeriod }),
...(StopGracePeriod !== null &&
StopGracePeriod !== undefined && { StopGracePeriod }),
...(replicaSets
? {
Command: ["/bin/bash"],