Scheduling infrastructure for absolutely everyone.
bugfix/sync-not-working-properly (#8168)
Efraín Rochína5bebe2b487f
diff --git a/apps/web/pages/[user]/calendar-cache/[month].tsx b/apps/web/pages/[user]/calendar-cache/[month].tsxindex d866b027a2c..8eff9ad2fc5 100644--- a/apps/web/pages/[user]/calendar-cache/[month].tsx+++ b/apps/web/pages/[user]/calendar-cache/[month].tsx@@ -47,7 +47,7 @@ export const getStaticProps: GetStaticProps<revalidate: 1,};} catch (error) {- let message = "Unknown error while fetching calendarƒ";+ let message = "Unknown error while fetching calendar";if (error instanceof Error) message = error.message;console.error(error, message);return {diff --git a/packages/core/CalendarManager.ts b/packages/core/CalendarManager.tsindex 9a5c3129499..4d3ee42cf19 100644--- a/packages/core/CalendarManager.ts+++ b/packages/core/CalendarManager.ts@@ -193,6 +193,9 @@ const getNextCache = async (username: string, month: string): Promise<EventBusyD).then((r) => r.json()).then((json) => json?.pageProps?.results);+ // No need to wait for this, the purpose is to force re-validation every second as indicated+ // in page getStaticProps.+ fetch(`${baseUrl}/${username}/calendar-cache/${month}`).catch(console.log);} catch (e) {log.warn(e);}