feat(locks): show a lock indicator on the lane card (D)
This commit is contained in:
@@ -2014,6 +2014,17 @@ export const api = {
|
||||
body: JSON.stringify(body),
|
||||
}),
|
||||
},
|
||||
|
||||
// ──────────────────────────────── Locks API ────────────────────────────────
|
||||
/** Named locks across all lanes: used for serialization and gating.
|
||||
* Maps to `server/routes/locks.js`. */
|
||||
locks: {
|
||||
/**
|
||||
* GET /api/locks — list all active named locks and their holders.
|
||||
* @returns `{ locks }` — all {@link NamedLock} records.
|
||||
*/
|
||||
list: (): Promise<{ locks: NamedLock[] }> => request<{ locks: NamedLock[] }>("/locks"),
|
||||
},
|
||||
};
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -2370,6 +2370,14 @@ export interface LaneRuntimeService {
|
||||
alive: boolean;
|
||||
}
|
||||
|
||||
/** A named lock held by a lane. */
|
||||
export interface NamedLock {
|
||||
name: string;
|
||||
holder: string;
|
||||
since: number;
|
||||
ageSec: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* What is actually running for a lane, recomputed by the server on every read
|
||||
* rather than cached — a process can die without telling anyone.
|
||||
|
||||
Reference in New Issue
Block a user