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

@ -15,7 +15,7 @@ import { getMessageSentTimestampSet } from './getMessageSentTimestampSet';
import { getAuthor } from '../messages/helpers';
import { isPniString } from '../types/ServiceId';
import { singleProtoJobQueue } from '../jobs/singleProtoJobQueue';
import dataInterface, { deleteAndCleanup } from '../sql/Client';
import { DataReader, DataWriter, deleteAndCleanup } from '../sql/Client';
import { deleteData } from '../types/Attachment';
import type {
@ -31,12 +31,9 @@ import type { AciString, PniString } from '../types/ServiceId';
import type { AttachmentType } from '../types/Attachment';
import type { MessageModel } from '../models/messages';
const {
getMessagesBySentAt,
getMostRecentAddressableMessages,
removeMessagesInConversation,
saveMessage,
} = dataInterface;
const { getMessagesBySentAt, getMostRecentAddressableMessages } = DataReader;
const { removeMessagesInConversation, saveMessage } = DataWriter;
export function doesMessageMatch({
conversationId,