Returns the allowed duration between SIGTERM and SIGKILL for the function, if any. This depends on whether there are any internal or external functions registered. We don't currently simulate extension shutdown delay. Ref: - https://github.com/aws-samples/graceful-shutdown-with-aws-lambda - https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html#runtimes-lifecycle-shutdown
(&self)
| 329 | /// - https://github.com/aws-samples/graceful-shutdown-with-aws-lambda |
| 330 | /// - https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtime-environment.html#runtimes-lifecycle-shutdown |
| 331 | pub async fn function_shutdown_delay(&self) -> Option<Duration> { |
| 332 | if self.has_internal_extension.load(Ordering::Relaxed) { |
| 333 | Some(Duration::from_millis(500)) |
| 334 | } else if self.has_external_extension.load(Ordering::Relaxed) { |
| 335 | Some(Duration::from_millis(300)) |
| 336 | } else { |
| 337 | None |
| 338 | } |
| 339 | } |
| 340 | } |
| 341 | |
| 342 | #[derive(Debug)] |