Files
speckle-server/packages/objectloader2/src/core/interfaces.ts
T
Adam Hathcock 812dac9920 OL2(fix) Use BatchingQueue instead of BatchedPool as parsing download happens on main thread asap anyway (#5165)
* Use BatchingQueue instead of BatchedPool as parsing download happens on main thread anyway

* add tests for keyedqueue

* clean up

* more prettier fix
2025-08-26 12:07:02 +01:00

19 lines
455 B
TypeScript

import Queue from '../queues/queue.js'
import { Item } from '../types/types.js'
export interface Downloader extends Queue<string> {
initialize(params: {
results: Queue<Item>
total: number
maxDownloadBatchWait?: number
}): void
downloadSingle(): Promise<Item>
disposeAsync(): Promise<void>
}
export interface Database {
getAll(ids: string[]): Promise<(Item | undefined)[]>
putAll(batch: Item[]): Promise<void>
dispose(): void
}