MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / function_shutdown_delay

Method function_shutdown_delay

crates/cargo-lambda-watch/src/state.rs:331–339  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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)]

Callers 1

runtimeFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected