qfix: Fix github measurements (#9816)

1. Fix github measurements
2. A bit more proper fix for caching of Octokit references

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2025-09-10 00:00:08 +05:00
committed by GitHub
parent eb9150541b
commit 04a9c52d48
12 changed files with 238 additions and 124 deletions
+9
View File
@@ -45,6 +45,15 @@ export class UserManager {
}
failedRefs = new Set<string>()
cacheRecord (workspace: WorkspaceUuid, ref: PersonId, record: GithubUserRecord): void {
if (this.refUserCache.size > 1000) {
this.refUserCache.clear()
}
const key = `${workspace}.${ref}`
this.refUserCache.set(key, record)
}
async getAccountByRef (
ctx: MeasureContext,
workspace: WorkspaceUuid,