Skip to main content

timeout_for

Function timeout_for 

Source
pub fn timeout_for(
    fields: &Map<String, Value>,
    default_ms: Option<u64>,
) -> Option<u64>
Expand description

The timeout this call should have, or None to leave it as it is.

  • default_ms: the CLI’s default (BASH_DEFAULT_TIMEOUT_MS). Nothing is done without one shorter than LONG_TIMEOUT_MS, so turning the 30 s default off turns this off too.
  • A call the CLI would stop gets LONG_TIMEOUT_MS when it sets no timeout; one it sets stands.
  • Any other call that sets a timeout longer than the default is clamped to the default, which is what moves it to the background then. A shorter one stands, and so does a call with none (the default applies).
  • A background call (run_in_background) is left alone.