From 59650cf3954615117f022e11a2d482fb84b88268 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Sat, 15 Feb 2025 00:10:49 -0600 Subject: [PATCH] Parallelize GitHub checks --- src/admin/insights/AdminAppInsights.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/admin/insights/AdminAppInsights.tsx b/src/admin/insights/AdminAppInsights.tsx index b32f1577..1a1b8dc1 100644 --- a/src/admin/insights/AdminAppInsights.tsx +++ b/src/admin/insights/AdminAppInsights.tsx @@ -38,6 +38,7 @@ export default async function AdminAppInsights() { cameras, filmSimulations, lenses, + codeMeta, ] = await Promise.all([ getPhotosMeta({ hidden: 'include' }), getPhotosMeta({ hidden: 'only' }), @@ -47,6 +48,14 @@ export default async function AdminAppInsights() { getUniqueCameras(), getUniqueFilmSimulations(), getUniqueLenses(), + IS_VERCEL_GIT_PROVIDER_GITHUB || IS_DEVELOPMENT + ? getGitHubMetaWithFallback({ + owner, + repo, + branch, + commit, + }) + : undefined, ]); const { @@ -54,15 +63,6 @@ export default async function AdminAppInsights() { hasVercelBlobStorage, } = APP_CONFIGURATION; - const codeMeta = IS_VERCEL_GIT_PROVIDER_GITHUB || IS_DEVELOPMENT - ? await getGitHubMetaWithFallback({ - owner, - repo, - branch, - commit, - }) - : undefined; - return (