206
207
async storeSessionsMetadataOnly(sessions: ChatModel[]): Promise<void> {
209
// Don't start this task if we missed the chance to block shutdown
210
return;
211
}
213
>
try {
214
>
this.storeTask = this.storeQueue.queue(async () => {
215
>
try {
216
>
await Promise.all(sessions.map(session => this.writeSessionMetadataOnly(session)));
217
>
await this.flushIndex();
218
>
} catch (e) {
219
this.reportError('storeSessions', 'Error storing chat sessions', e);
220
}
222
>
await this.storeTask;
223
>
} finally {
224
>
this.storeTask = undefined;
225
>
}
226
>
}
227
228
async storeTransferSession(transferData: IChatTransfer, session: ChatModel): Promise<void> {