Skip to content

Commit

Permalink
clickhouse-request-count (Helicone#490)
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottMktn authored Jun 13, 2023
1 parent f8cc164 commit 803c93a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions web/pages/api/user/checkOnboarded.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import { getRequestCount } from "../../../lib/api/request/request";
import {
getRequestCount,
getRequestCountClickhouse,
} from "../../../lib/api/request/request";

import { SupabaseClient } from "@supabase/supabase-js";
import {
Expand All @@ -13,7 +16,7 @@ async function checkAndUpdateOrgs(
supabaseClient: SupabaseClient<Database>
): Promise<boolean> {
for (const org of orgs) {
const count = (await getRequestCount(org.id, "all")).data ?? 0;
const count = (await getRequestCountClickhouse(org.id, "all")).data ?? 0;
if (count > 0) {
await supabaseClient
.from("organization")
Expand Down

0 comments on commit 803c93a

Please sign in to comment.