refactor: streamline event fetching and improve UI table layout

Updated the event fetching logic to utilize Promise.all for concurrent API calls, enhancing performance. Adjusted the UI table layout by modifying the column span for better alignment and presentation of the empty queue state. Introduced constants for maximum events to improve code clarity.
This commit is contained in:
Mauricio Siu
2026-03-03 14:09:46 -06:00
parent edceebec7e
commit af76548482
3 changed files with 9 additions and 11 deletions

View File

@@ -3,6 +3,9 @@ import { logger } from "./logger";
const baseUrl = process.env.INNGEST_BASE_URL ?? "";
const signingKey = process.env.INNGEST_SIGNING_KEY ?? "";
const DEFAULT_MAX_EVENTS = 500;
const MAX_EVENTS = DEFAULT_MAX_EVENTS;
/** Event shape from GET /v1/events (https://api.inngest.com/v1/events) */
type InngestEventRow = {
internal_id?: string;
@@ -232,9 +235,5 @@ export const fetchDeploymentJobs = async (
}),
);
return buildDeploymentRowsFromRuns(events, runsByEventId, serverId);
return buildDeploymentRowsFromRuns(toFetch, runsByEventId, serverId);
};
const DEFAULT_MAX_EVENTS = 500;
const MAX_EVENTS = DEFAULT_MAX_EVENTS;