T
Twenty5mo ago
Saifee

Email syncing isn't completing

I've connected my Google account for email syncing and the logs are
LOG [MessagingMessageListFetchJob] Fetching full message list for workspace d09f31d9-0b5d-4708-a377-255e3cab337e and account bf968f31-74c6-4f2e-aaf3-bd3b970fcce5
[Nest] 40023 - 06/13/2024, 12:45:29 PM

LOG [MessagingGmailFullMessageListFetchService] Added 40 message IDs from Gmail for messageChannel bef84cf0-b260-426c-9a2e-0c23372450ca in workspace d09f31d9-0b5d-4708-a377-255e3cab337e and added to cache for import
LOG [MessagingMessageListFetchJob] Fetching full message list for workspace d09f31d9-0b5d-4708-a377-255e3cab337e and account bf968f31-74c6-4f2e-aaf3-bd3b970fcce5
[Nest] 40023 - 06/13/2024, 12:45:29 PM

LOG [MessagingGmailFullMessageListFetchService] Added 40 message IDs from Gmail for messageChannel bef84cf0-b260-426c-9a2e-0c23372450ca in workspace d09f31d9-0b5d-4708-a377-255e3cab337e and added to cache for import
However on the screen, it shows syncing "ongoing" but it never completes. What am I doing wrong? I'm running it locally using
npx nx start twenty-server
npx nx start twenty-front
npx nx start twenty-server
npx nx start twenty-front
My environment variables are
PG_DATABASE_URL=postgres://twenty:twenty@localhost:5432/default
MESSAGE_QUEUE_TYPE=sync
...
PG_DATABASE_URL=postgres://twenty:twenty@localhost:5432/default
MESSAGE_QUEUE_TYPE=sync
...
No description
6 Replies
charles
charles5mo ago
Hi @Saifee, to use messaging sync, you'll need to configure your worker. Are you self-hosting ? If yes, make sure to use the latest docker-compose: https://github.com/twentyhq/twenty/blob/main/packages/twenty-docker/docker-compose.yml
GitHub
twenty/packages/twenty-docker/docker-compose.yml at main · twentyhq...
Building a modern alternative to Salesforce, powered by the community. - twentyhq/twenty
charles
charles5mo ago
You should have one server and one worker running Twenty (the worker will take care of jobs asynchronously) Make sure to have: - MESSAGE_QUEUE_TYPE=pg-boss (or redis if you want to setup redis which is faster) ==> this will say to your server to push the jobs into a postgres table, the worker will pick them from there And to run these commands from worker container: yarn command:prod cron:messaging:messages-import yarn command:prod cron:messaging:message-list-fetch
jellifish
jellifish4mo ago
I'm also having this issue, using docker. I tried running the commands in the worker container and they seem to do something but the "ongoing..." indicator keeps staying on, and I notice that if I click on people there are no emails associated with them (although people are imported from the email address book)
charles
charles4mo ago
People and companies can be created through emails and calendarEvents, it's likely that they have calendar events attached to them in this case. The calendar sync is synchronous at the moment but not the email one could you show me the logs of your worker? It's likely that it's not running properly
jellifish
jellifish4mo ago
I fixed it by using redis instead of postgres.
charles
charles4mo ago
ok, redis should be faster 🙂
Want results from more Discord servers?
Add your server