Replace startup with attachment background migration

Iterates through `Message::id` index.
This commit is contained in:
Daniel Gasienica 2018-04-02 19:01:30 -04:00
parent c853d1bccd
commit 77b1f3c505
3 changed files with 22 additions and 19 deletions

View file

@ -237,7 +237,10 @@ const _processBatch = async ({ connection, upgradeMessageSchema } = {}) => {
await settings.deleteAttachmentMigrationLastProcessedIndex(connection);
}
const batchTotalDuration = Date.now() - fetchUnprocessedMessagesStartTime;
return {
batchTotalDuration,
done,
fetchDuration,
lastProcessedIndex,