mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-06 09:47:43 +02:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user