mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-14 21:35:25 +00:00
add zoekt max wall time env var
This commit is contained in:
parent
92a81387df
commit
b099b4adb5
2 changed files with 2 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ export const env = createEnv({
|
||||||
ZOEKT_WEBSERVER_URL: z.string().url().default("http://localhost:6070"),
|
ZOEKT_WEBSERVER_URL: z.string().url().default("http://localhost:6070"),
|
||||||
SHARD_MAX_MATCH_COUNT: numberSchema.default(10000),
|
SHARD_MAX_MATCH_COUNT: numberSchema.default(10000),
|
||||||
TOTAL_MAX_MATCH_COUNT: numberSchema.default(100000),
|
TOTAL_MAX_MATCH_COUNT: numberSchema.default(100000),
|
||||||
|
ZOEKT_MAX_WALL_TIME_MS: numberSchema.default(10000),
|
||||||
|
|
||||||
// Auth
|
// Auth
|
||||||
AUTH_SECRET: z.string(),
|
AUTH_SECRET: z.string(),
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ export const search = async ({ query, maxMatchDisplayCount, whole}: SearchReques
|
||||||
Whole: !!whole,
|
Whole: !!whole,
|
||||||
ShardMaxMatchCount: env.SHARD_MAX_MATCH_COUNT,
|
ShardMaxMatchCount: env.SHARD_MAX_MATCH_COUNT,
|
||||||
TotalMaxMatchCount: env.TOTAL_MAX_MATCH_COUNT,
|
TotalMaxMatchCount: env.TOTAL_MAX_MATCH_COUNT,
|
||||||
|
MaxWallTime: env.ZOEKT_MAX_WALL_TIME_MS * 1000 * 1000, // zoekt expects a duration in nanoseconds
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue