fix: functions race condition for state

This commit is contained in:
Torsten Dittmann committed 2024-02-05 10:23:18 +01:00
1 parent 0cfca8fac6
commit 0a05cd4de1
2 files changed
+8 -5

No files matched your search

@@ -8,10 +8,15 @@ import type { LayoutLoad } from './$types';
export const load: LayoutLoad = async ({ depends }) => {
depends(Dependencies.FUNCTION_INSTALLATIONS);
const [runtimesList, installations] = await Promise.all([
sdk.forProject.functions.listRuntimes(),
sdk.forProject.vcs.listInstallations([Query.limit(100)])
]);
return {
header: Header,
breadcrumbs: Breadcrumbs,
runtimesList: sdk.forProject.functions.listRuntimes(),
installations: sdk.forProject.vcs.listInstallations([Query.limit(100)])
runtimesList,
installations
};
};
@@ -31,8 +31,6 @@ export const load: PageLoad = async ({ params, depends }) => {
return {
variables,
globalVariables,
runtimesList: sdk.forProject.functions.listRuntimes(),
installations: sdk.forProject.vcs.listInstallations()
globalVariables
};
};