refactor: simplify StopGracePeriod handling in container specifications

- Updated the handling of StopGracePeriod in various database builders to streamline the condition check, improving code readability and maintainability.
This commit is contained in:
Mauricio Siu
2025-11-28 10:41:33 -06:00
parent 1c652477fb
commit 218c077255
6 changed files with 6 additions and 12 deletions

View File

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