-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix syncStageStartedAt not correctly set #7436
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request addresses an issue with the 'syncStageStartedAt' field not being correctly set during the message import process in the Twenty server.
- Added setting of 'syncStageStartedAt' in
packages/twenty-server/src/modules/messaging/common/services/message-channel-sync-status.service.ts
when marking channels as 'MESSAGES_IMPORT_ONGOING' - Removed MessageChannelSyncStage check and import in
packages/twenty-server/src/modules/messaging/message-import-manager/services/messaging-messages-import.service.ts
- Removed 'syncStageStartedAt: null' from update operation in
packages/twenty-server/src/modules/messaging/message-import-manager/services/messaging-partial-message-list-fetch.service.ts
- These changes aim to improve sync stage tracking and process management
3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
@@ -55,13 +52,6 @@ export class MessagingMessagesImportService { | |||
let messageIdsToFetch: string[] = []; | |||
|
|||
try { | |||
if ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bosiraphael why are we removing this condition? it seems legit to me
@@ -54,7 +54,6 @@ export class MessagingPartialMessageListFetchService { | |||
}, | |||
{ | |||
throttleFailureCount: 0, | |||
syncStageStartedAt: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this one, are you afraid of race conditions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually I agree with this one as this is the role of the message-channel-sync status
@@ -161,6 +161,7 @@ export class MessageChannelSyncStatusService { | |||
|
|||
await messageChannelRepository.update(messageChannelIds, { | |||
syncStage: MessageChannelSyncStage.MESSAGES_IMPORT_ONGOING, | |||
syncStageStartedAt: new Date().toISOString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's it, I'm not sure about the other changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bosiraphael! I've left a few comments
Fix syncStageStartedAt not correctly set --------- Co-authored-by: Charles Bochet <[email protected]>
Fix syncStageStartedAt not correctly set