Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(insights): lower limit to prevent timeouts #6313

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
"node": ">=16.8.0 <18.0.0 || >=18.11",
"npm": "please-use-pnpm",
"yarn": "please-use-pnpm",
"pnpm": ">=8.6.12"
"pnpm": ">=9.0.5"
},
"packageManager": "pnpm@9.0.5",
"pnpm": {
Expand Down
2 changes: 1 addition & 1 deletion packages/insights/src/db/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export async function getEdges(
.from(edgeTable)
.where(where)
.groupBy(edgeTable.from, edgeTable.to)
.limit(limit || 100_000); // TODO: The 100_000 limit is due to Turso serialization format not being efficient, upgrade this once Turso is fixed.
.limit(limit || 10_000); // TODO: The 10_000 limit is due to Turso serialization format not being efficient, upgrade this once Turso is fixed.
const rows = await query.all();
return rows.map((e) => ({
from: e.from,
Expand Down
1 change: 1 addition & 0 deletions packages/insights/src/routes/plugin@auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const { onRequest, useAuthSession, useAuthSignin, useAuthSignout } = serv
({ env }) => ({
secret: env.get('PRIVATE_AUTH_SECRET'),
trustHost: true,
basePath: env.get('PRIVATE_AUTH_BASE_API'),
providers: [
GitHub({
clientId: env.get('PRIVATE_GITHUB_ID')!,
Expand Down
Loading