UBERF-8578: Fix extra stat call for storage adapter (#7132)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2024-11-08 17:36:15 +07:00
committed by GitHub
parent a05e2a31d9
commit 04c8c2ffa0
5 changed files with 79 additions and 63 deletions
+12 -1
View File
@@ -48,8 +48,8 @@ import type { Request, Response } from '@hcengineering/rpc'
import type { Token } from '@hcengineering/server-token'
import { type Readable } from 'stream'
import type { DbAdapter, DomainHelper } from './adapter'
import { type StorageAdapter } from './storage'
import type { StatisticsElement } from './stats'
import { type StorageAdapter } from './storage'
export interface ServerFindOptions<T extends Doc> extends FindOptions<T> {
domain?: Domain // Allow to find for Doc's in specified domain only.
@@ -519,6 +519,17 @@ export interface StorageConfig {
port?: number
}
export class NoSuchKeyError extends Error {
code: string
constructor (
msg: string,
readonly cause?: any
) {
super(msg)
this.code = 'NoSuchKey'
}
}
export interface StorageConfiguration {
default: string
storages: StorageConfig[]