Merge pull request #767 from appwrite/fix-race-condition-functions

fix: functions race condition for state
This commit is contained in:
Torsten Dittmann authored and GitHub committed 2024-02-05 11:01:48 +01:00
commit 2d6e9485c8
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
};
};