Parallelize SQL queries

This commit is contained in:
Fedor Indutny 2024-07-22 11:16:33 -07:00 committed by GitHub
parent 86b4da1ec2
commit c64762858e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
178 changed files with 3377 additions and 3618 deletions

View file

@ -10,7 +10,7 @@ import {
savePackMetadata,
getStickerPackStatus,
} from '../types/Stickers';
import dataInterface from '../sql/Client';
import { DataWriter } from '../sql/Client';
import type { AttachmentType, ThumbnailType } from '../types/Attachment';
import type { EmbeddedContactType } from '../types/EmbeddedContact';
@ -239,7 +239,7 @@ export async function queueAttachmentDownloads(
// Save the packId/packKey for future download/install
void savePackMetadata(packId, packKey, { messageId });
} else {
await dataInterface.addStickerPackReference(messageId, packId);
await DataWriter.addStickerPackReference(messageId, packId);
}
if (!data) {