Prioritize conversation replies
This commit is contained in:
1 parent
f55ae7ddf8
commit
9b86cee9be
13 files changed
+535
-39
No files matched your search
@@ -54,6 +54,7 @@ export class RateLimiter {
|
||||
fn: () => Promise<T>,
|
||||
shouldCount: (result: T) => boolean = () => true,
|
||||
signal?: AbortSignal,
|
||||
priority = 0,
|
||||
): Promise<T> {
|
||||
return this.queue.add(async () => {
|
||||
await this.initialize();
|
||||
@@ -92,7 +93,7 @@ export class RateLimiter {
|
||||
}
|
||||
|
||||
return result;
|
||||
}) as Promise<T>;
|
||||
}, { priority }) as Promise<T>;
|
||||
}
|
||||
|
||||
private async loadHistory(provider: SentMessageHistoryProvider): Promise<void> {
|
||||
|
||||
Reference in new issue
Block a user