mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 00:23:31 -06:00
fix: increase Banner API timeouts to handle slow responses
This commit is contained in:
+3
-3
@@ -40,9 +40,9 @@ impl BannerApi {
|
|||||||
.cookie_store(false)
|
.cookie_store(false)
|
||||||
.user_agent(user_agent())
|
.user_agent(user_agent())
|
||||||
.tcp_keepalive(Some(std::time::Duration::from_secs(60 * 5)))
|
.tcp_keepalive(Some(std::time::Duration::from_secs(60 * 5)))
|
||||||
.read_timeout(std::time::Duration::from_secs(10))
|
.read_timeout(std::time::Duration::from_secs(20))
|
||||||
.connect_timeout(std::time::Duration::from_secs(10))
|
.connect_timeout(std::time::Duration::from_secs(15))
|
||||||
.timeout(std::time::Duration::from_secs(30))
|
.timeout(std::time::Duration::from_secs(40))
|
||||||
.build()
|
.build()
|
||||||
.context("Failed to create HTTP client")?,
|
.context("Failed to create HTTP client")?,
|
||||||
)
|
)
|
||||||
|
|||||||
+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". */
|
/** 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 {
|
export function formatAbsoluteDate(date: string | Date): string {
|
||||||
if (date == null) return "—";
|
|
||||||
const d = typeof date === "string" ? new Date(date) : date;
|
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");
|
return format(d, "MMM d, yyyy, h:mm:ss a");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -284,9 +284,13 @@ function getTimingDisplay(
|
|||||||
const tooltipLines = [
|
const tooltipLines = [
|
||||||
`Queued: ${formatAbsoluteDate(job.queuedAt)}`,
|
`Queued: ${formatAbsoluteDate(job.queuedAt)}`,
|
||||||
`Waited: ${formatDuration(Math.max(0, waitedMs))}`,
|
`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 {
|
return {
|
||||||
text: `${prefix} ${formatDuration(processingMs)}`,
|
text: `${prefix} ${formatDuration(processingMs)}`,
|
||||||
|
|||||||
Reference in New Issue
Block a user