refactor(backend): better code quality, fix timeout issue, fix website eat port 3000, fix nginx wrong point, better docker compose file, moving some file and change some import, update package dependency etc.

This commit is contained in:
2026-07-06 21:44:30 +07:00 Unverified
parent 6a4f06f5aa
commit 05cf38d020
11 changed files with 238 additions and 198 deletions
+6 -3
View File
@@ -1,5 +1,7 @@
"use server";
import { revalidateTag } from "next/cache";
import { readdirSync } from "fs";
import { join } from "path";
@@ -59,9 +61,7 @@ export async function refetchPlatform(
? JSON.parse(cached)
: {};
counts[platform] = count;
await redis.set("erika:follower_counts", JSON.stringify(counts), {
ex: 3600,
});
await redis.set("erika:follower_counts", JSON.stringify(counts), { ex: 3600 });
if (tiktokProfile) {
await redis.set(
@@ -74,5 +74,8 @@ export async function refetchPlatform(
// Redis unavailable
}
// @ts-ignore
revalidateTag("follower-counts-api");
return { count };
}