mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-19 08:51:37 +03:00
Properly handle failed promises (#7488)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
45e84f730f
commit
898395d83d
@ -352,7 +352,11 @@ export class RateLimiter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async waitProcessing (): Promise<void> {
|
async waitProcessing (): Promise<void> {
|
||||||
await Promise.all(this.processingQueue.values())
|
while (this.processingQueue.size > 0) {
|
||||||
|
await new Promise<void>((resolve) => {
|
||||||
|
this.notify.push(resolve)
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user