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:
@@ -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 };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user