5617 Create CalendarOngoingStaleCron Job (#6748)

Closes #5617

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Raphaël Bosi
2024-08-27 19:13:15 +02:00
committed by GitHub
parent e771793626
commit e6a55f270b
9 changed files with 214 additions and 0 deletions

View File

@ -93,6 +93,20 @@ export class MessageChannelSyncStatusService {
await this.scheduleFullMessageListFetch(messageChannelId);
}
public async resetSyncStageStartedAt(messageChannelId: string) {
const messageChannelRepository =
await this.twentyORMManager.getRepository<MessageChannelWorkspaceEntity>(
'messageChannel',
);
await messageChannelRepository.update(
{ id: messageChannelId },
{
syncStageStartedAt: null,
},
);
}
public async markAsMessagesListFetchOngoing(messageChannelId: string) {
const messageChannelRepository =
await this.twentyORMManager.getRepository<MessageChannelWorkspaceEntity>(