Skip to content

Commit b099b4a

Browse files
committed
add zoekt max wall time env var
1 parent 92a8138 commit b099b4a

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/web/src/env.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export const env = createEnv({
1616
ZOEKT_WEBSERVER_URL: z.string().url().default("http://localhost:6070"),
1717
SHARD_MAX_MATCH_COUNT: numberSchema.default(10000),
1818
TOTAL_MAX_MATCH_COUNT: numberSchema.default(100000),
19+
ZOEKT_MAX_WALL_TIME_MS: numberSchema.default(10000),
1920

2021
// Auth
2122
AUTH_SECRET: z.string(),

packages/web/src/lib/server/searchService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export const search = async ({ query, maxMatchDisplayCount, whole}: SearchReques
6161
Whole: !!whole,
6262
ShardMaxMatchCount: env.SHARD_MAX_MATCH_COUNT,
6363
TotalMaxMatchCount: env.TOTAL_MAX_MATCH_COUNT,
64+
MaxWallTime: env.ZOEKT_MAX_WALL_TIME_MS * 1000 * 1000, // zoekt expects a duration in nanoseconds
6465
}
6566
});
6667

0 commit comments

Comments
 (0)