Fix: Set sync stage started at when starting sync (#7046)

Fix:`syncStageStartedAt` was not set correctly after refactoring
This commit is contained in:
Raphaël Bosi 2024-09-16 15:10:53 +02:00 committed by GitHub
parent 833832525c
commit f1264fda76
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -125,6 +125,7 @@ export class MessageChannelSyncStatusService {
await messageChannelRepository.update(messageChannelIds, {
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_ONGOING,
syncStatus: MessageChannelSyncStatus.ONGOING,
syncStageStartedAt: new Date().toISOString(),
});
}
@ -142,9 +143,10 @@ export class MessageChannelSyncStatusService {
await messageChannelRepository.update(messageChannelIds, {
syncStatus: MessageChannelSyncStatus.ACTIVE,
syncStage: MessageChannelSyncStage.PARTIAL_MESSAGE_LIST_FETCH_PENDING,
throttleFailureCount: 0,
syncStageStartedAt: null,
});
await this.schedulePartialMessageListFetch(messageChannelIds);
}
public async markAsMessagesImportOngoing(messageChannelIds: string[]) {