mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 10:23:39 -06:00
fix: increase Banner API timeouts to handle slow responses
This commit is contained in:
+1
-3
@@ -7,9 +7,7 @@ export function formatRelativeDate(date: string | Date): string {
|
||||
}
|
||||
|
||||
/** Returns a full absolute datetime string for tooltip display, e.g. "Jan 29, 2026, 3:45:12 PM". */
|
||||
export function formatAbsoluteDate(date: string | Date | null | undefined): string {
|
||||
if (date == null) return "—";
|
||||
export function formatAbsoluteDate(date: string | Date): string {
|
||||
const d = typeof date === "string" ? new Date(date) : date;
|
||||
if (Number.isNaN(d.getTime())) return "—";
|
||||
return format(d, "MMM d, yyyy, h:mm:ss a");
|
||||
}
|
||||
|
||||
@@ -284,9 +284,13 @@ function getTimingDisplay(
|
||||
const tooltipLines = [
|
||||
`Queued: ${formatAbsoluteDate(job.queuedAt)}`,
|
||||
`Waited: ${formatDuration(Math.max(0, waitedMs))}`,
|
||||
`Locked: ${formatAbsoluteDate(job.lockedAt)}`,
|
||||
`${job.status === "staleLock" ? "Stale for" : "Processing"}: ${formatDuration(processingMs)}`,
|
||||
];
|
||||
if (job.lockedAt) {
|
||||
tooltipLines.push(`Locked: ${formatAbsoluteDate(job.lockedAt)}`);
|
||||
}
|
||||
tooltipLines.push(
|
||||
`${job.status === "staleLock" ? "Stale for" : "Processing"}: ${formatDuration(processingMs)}`,
|
||||
);
|
||||
|
||||
return {
|
||||
text: `${prefix} ${formatDuration(processingMs)}`,
|
||||
|
||||
Reference in New Issue
Block a user