From a18dc8f4ded21c9cfa94d7bf4a3f539d5c97749c Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Mon, 19 Aug 2024 19:17:55 +0200 Subject: [PATCH] Patch messaging import crons not running --- .../crons/jobs/messaging-message-list-fetch.cron.job.ts | 4 +--- .../messaging-message-channel-sync-status-monitoring.cron.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/twenty-server/src/modules/messaging/message-import-manager/crons/jobs/messaging-message-list-fetch.cron.job.ts b/packages/twenty-server/src/modules/messaging/message-import-manager/crons/jobs/messaging-message-list-fetch.cron.job.ts index 0eb06acc5ec1..3f7334cf7c19 100644 --- a/packages/twenty-server/src/modules/messaging/message-import-manager/crons/jobs/messaging-message-list-fetch.cron.job.ts +++ b/packages/twenty-server/src/modules/messaging/message-import-manager/crons/jobs/messaging-message-list-fetch.cron.job.ts @@ -46,9 +46,7 @@ export class MessagingMessageListFetchCronJob { 'messageChannel', ); - const messageChannels = await messageChannelRepository.find({ - select: ['id'], - }); + const messageChannels = await messageChannelRepository.find(); for (const messageChannel of messageChannels) { if ( diff --git a/packages/twenty-server/src/modules/messaging/monitoring/crons/jobs/messaging-message-channel-sync-status-monitoring.cron.ts b/packages/twenty-server/src/modules/messaging/monitoring/crons/jobs/messaging-message-channel-sync-status-monitoring.cron.ts index 9d403fa09941..e3a3b5e06c63 100644 --- a/packages/twenty-server/src/modules/messaging/monitoring/crons/jobs/messaging-message-channel-sync-status-monitoring.cron.ts +++ b/packages/twenty-server/src/modules/messaging/monitoring/crons/jobs/messaging-message-channel-sync-status-monitoring.cron.ts @@ -46,8 +46,8 @@ export class MessagingMessageChannelSyncStatusMonitoringCronJob { for (const activeWorkspace of activeWorkspaces) { const messageChannelRepository = await this.twentyORMGlobalManager.getRepositoryForWorkspace( - 'messageChannel', activeWorkspace.id, + 'messageChannel', ); const messageChannels = await messageChannelRepository.find({ select: ['id', 'syncStatus', 'connectedAccountId'],