|
1 | | -// import { getCurrentUser } from "@/lib/auth" |
2 | | -// import { redirect } from "next/navigation" |
3 | | -// import BulkAggregationClient from "./bulk-aggregation-client" |
4 | | - |
5 | | -// export default async function BulkAggregationPage() { |
6 | | -// const user = await getCurrentUser() |
7 | | -// if (!user) redirect("/login") |
8 | | - |
9 | | -// // In production, fetch aggregation configs from database |
10 | | -// const aggregationRules = [ |
11 | | -// { |
12 | | -// id: "rule-1", |
13 | | -// name: "Stripe Payment Events", |
14 | | -// provider: "stripe", |
15 | | -// eventPatterns: ["payment_intent.*", "charge.*"], |
16 | | -// enabled: true, |
17 | | -// config: { |
18 | | -// mode: "time_window", |
19 | | -// windowMs: 5000, // 5 seconds |
20 | | -// maxBatchSize: 50, |
21 | | -// deduplicate: true, |
22 | | -// deduplicationKey: "id", |
23 | | -// }, |
24 | | -// stats: { |
25 | | -// eventsProcessed: 1247, |
26 | | -// batchesCreated: 89, |
27 | | -// averageBatchSize: 14, |
28 | | -// duplicatesSkipped: 23, |
29 | | -// }, |
30 | | -// createdAt: new Date(Date.now() - 1000 * 60 * 60 * 24 * 7).toISOString(), |
31 | | -// lastTriggered: new Date(Date.now() - 1000 * 60 * 30).toISOString(), |
32 | | -// }, |
33 | | -// { |
34 | | -// id: "rule-2", |
35 | | -// name: "GitHub Push Events", |
36 | | -// provider: "github", |
37 | | -// eventPatterns: ["push"], |
38 | | -// enabled: true, |
39 | | -// config: { |
40 | | -// mode: "count", |
41 | | -// maxBatchSize: 10, |
42 | | -// timeoutMs: 10000, // 10 seconds |
43 | | -// deduplicate: false, |
44 | | -// }, |
45 | | -// stats: { |
46 | | -// eventsProcessed: 432, |
47 | | -// batchesCreated: 44, |
48 | | -// averageBatchSize: 9.8, |
49 | | -// duplicatesSkipped: 0, |
50 | | -// }, |
51 | | -// createdAt: new Date(Date.now() - 1000 * 60 * 60 * 24 * 3).toISOString(), |
52 | | -// lastTriggered: new Date(Date.now() - 1000 * 60 * 5).toISOString(), |
53 | | -// }, |
54 | | -// ] |
55 | | - |
56 | | -// return <BulkAggregationClient user={user} aggregationRules={aggregationRules} /> |
57 | | -// } |
58 | | - |
59 | | - |
60 | | - |
61 | | - |
62 | | - |
| 1 | +export const dynamic = "force-dynamic" |
63 | 2 |
|
64 | 3 | import { getCurrentUser } from "@/lib/auth" |
65 | 4 | import { redirect } from "next/navigation" |
|
0 commit comments