chore(buffer): final adjustments to buffer before deploy

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-09-18 22:48:52 +02:00
parent 13a83155cf
commit dfe00040de
12 changed files with 21972 additions and 54 deletions

View File

@@ -13,14 +13,12 @@ function shortNumber(num: number) {
if (num >= 1e9 && num < 1e12) return `${+(num / 1e9).toFixed(1)}B`;
if (num >= 1e12) return `${+(num / 1e12).toFixed(1)}T`;
}
const getProjectsWithCount = cacheable(async () => {
const getProjectsWithCount = cacheable(async function getProjectsWithCount() {
const projects = await chQuery<{ project_id: string; count: number }>(
`SELECT project_id, count(*) as count from ${TABLE_NAMES.events} GROUP by project_id order by count()`,
);
return projects;
}, 60 * 10);
}, 60 * 60);
export async function Hero() {
const projects = await getProjectsWithCount();