mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 02:47:34 +00:00
chore(orchestration): annotate the remote count query's row type
This commit is contained in:
@@ -70,11 +70,10 @@ export function listRemoteDispatches(
|
||||
|
||||
export function countRemoteDispatches(db: OrchestrationDb, runId: string | undefined): number {
|
||||
// oxlint-disable-next-line typescript/consistent-type-assertions -- SAFETY: COUNT(*) returns one number.
|
||||
return (
|
||||
db.db
|
||||
.prepare('SELECT COUNT(*) AS count FROM remote_dispatches WHERE (? IS NULL OR run_id = ?)')
|
||||
.get(runId ?? null, runId ?? null) as { count: number }
|
||||
).count
|
||||
const row = db.db
|
||||
.prepare('SELECT COUNT(*) AS count FROM remote_dispatches WHERE (? IS NULL OR run_id = ?)')
|
||||
.get(runId ?? null, runId ?? null) as { count: number }
|
||||
return row.count
|
||||
}
|
||||
|
||||
/** Identity only: which server runs the Dispatch and for which Task. State comes from the server's queue. */
|
||||
|
||||
Reference in New Issue
Block a user