queue job

This commit is contained in:
x
2025-05-02 15:23:35 -04:00
parent d13e685a81
commit 877485b45a
8 changed files with 75 additions and 16 deletions
+2 -3
View File
@@ -572,19 +572,18 @@ export const registerAdminRouter = async (server: FastifyZodProvider) => {
});
},
handler: async (req) => {
const keysCleared = await server.services.superAdmin.invalidateCache(req.body.type);
await server.services.superAdmin.invalidateCache(req.body.type);
await server.services.telemetry.sendPostHogEvents({
event: PostHogEventTypes.InvalidateCache,
distinctId: getTelemetryDistinctId(req),
properties: {
keysCleared,
...req.auditLogInfo
}
});
return {
message: `Successfully invalidated ${keysCleared} cached items`
message: "Cache invalidation job started"
};
}
});