Fix: Set sync stage started at when starting sync (#7046)
Fix:`syncStageStartedAt` was not set correctly after refactoring
This commit is contained in:
@ -125,6 +125,7 @@ export class MessageChannelSyncStatusService {
|
|||||||
await messageChannelRepository.update(messageChannelIds, {
|
await messageChannelRepository.update(messageChannelIds, {
|
||||||
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_ONGOING,
|
syncStage: MessageChannelSyncStage.MESSAGE_LIST_FETCH_ONGOING,
|
||||||
syncStatus: MessageChannelSyncStatus.ONGOING,
|
syncStatus: MessageChannelSyncStatus.ONGOING,
|
||||||
|
syncStageStartedAt: new Date().toISOString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,9 +143,10 @@ export class MessageChannelSyncStatusService {
|
|||||||
|
|
||||||
await messageChannelRepository.update(messageChannelIds, {
|
await messageChannelRepository.update(messageChannelIds, {
|
||||||
syncStatus: MessageChannelSyncStatus.ACTIVE,
|
syncStatus: MessageChannelSyncStatus.ACTIVE,
|
||||||
|
syncStage: MessageChannelSyncStage.PARTIAL_MESSAGE_LIST_FETCH_PENDING,
|
||||||
|
throttleFailureCount: 0,
|
||||||
|
syncStageStartedAt: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.schedulePartialMessageListFetch(messageChannelIds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async markAsMessagesImportOngoing(messageChannelIds: string[]) {
|
public async markAsMessagesImportOngoing(messageChannelIds: string[]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user