Skip to main content

run_bounded_query

Function run_bounded_query 

Source
pub fn run_bounded_query(
    command: Command,
    arguments: &str,
    deadline: Duration,
    grace: Duration,
) -> Result<QueryOutput, SingleFlightError>
Expand description

What: Run a query command to its end or its deadline. Why: Both streams go to anonymous files, so no reader thread can outlive a stopped query. A query past its deadline is a coordination failure, not an answer.

In TS you’d write (pseudocode):

async function runBoundedQuery({ command, arguments, deadlineMs, graceMs }): Promise<QueryOutput>;