Export long message attachments
This commit is contained in:
parent
a9406a7914
commit
511fc9c1a0
20 changed files with 423 additions and 82 deletions
|
@ -9,6 +9,7 @@ import { isNotNil } from '../util/isNotNil';
|
|||
import type { MessageAttributesType } from '../model-types.d';
|
||||
import type { AciString } from '../types/ServiceId';
|
||||
import * as Errors from '../types/errors';
|
||||
import { DataReader, DataWriter } from '../sql/Client';
|
||||
|
||||
const MAX_CONCURRENCY = 5;
|
||||
|
||||
|
@ -126,3 +127,18 @@ export async function migrateMessageData({
|
|||
totalDuration,
|
||||
};
|
||||
}
|
||||
|
||||
export async function migrateBatchOfMessages({
|
||||
numMessagesPerBatch,
|
||||
}: {
|
||||
numMessagesPerBatch: number;
|
||||
}): ReturnType<typeof migrateMessageData> {
|
||||
return migrateMessageData({
|
||||
numMessagesPerBatch,
|
||||
upgradeMessageSchema: window.Signal.Migrations.upgradeMessageSchema,
|
||||
getMessagesNeedingUpgrade: DataReader.getMessagesNeedingUpgrade,
|
||||
saveMessages: DataWriter.saveMessages,
|
||||
incrementMessagesMigrationAttempts:
|
||||
DataWriter.incrementMessagesMigrationAttempts,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue