pub fn run_bounded_query(
command: Command,
arguments: &str,
requested_deadline: Duration,
grace: Duration,
environment: &[(OsString, OsString)],
) -> 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>;