Calendar sync succeeds, while Gmail sync does not start
Hi v0.33.0 is running on docker.
Following commands were executed on Worker container.
Gmail and Calendar access is granted through UI.
Calendar sync works fine but Gmail sync does not import any message.
Setting page continues to show
importing
Google Cloud Console shows sustained requests (1 req / min) at Calendar API, while Gmail API does not receive any request except when granted.
Worker log indicates Gmail sync cron job ends fairly quickly. I guess requests are not sent.
How could this be fixed?9 Replies
@RaphaĆ«l š
Hello @bn, could you show me your env variables and tell me what are the statuses for the messageChannel in your db?
Do you see any errors in your worker's terminal?
Could you look at module:messaging:messages-to-import in your redis and tell me if there are message ids there?
@Raphaƫl Thanks for following up.
Hope following gives you a clue.
It seems that the MessagingMessagesImportCronJob are running correctly according to the logs, can you check your db to see if messages have been imported and tell me what are the statuses for the messageChannel in your db? Thank you
Could you change
MESSAGE_QUEUE_TYPE=bull-mq
?@Raphaƫl
This is what I got from
db
. I also updated MESSAGE_QUEUE_TYPE
but still the same situation.
SELECT * FROM "workspace_cpm71hy00wbh9oh8qzputiy9h"."messageChannel";| id | visibility | handle | type | isContactAutoCreationEnabled | contactAutoCreationPolicy | excludeNonProfessionalEmails | excludeGroupEmails | isSyncEnabled | syncCursor | syncedAt | syncStatus | syncStage | syncStageStartedAt | throttleFailureCount | createdAt | updatedAt | deletedAt | connectedAccountId | | 510cf144-efdc-4022-a514-93d01014ab80 | SHARE_EVERYTHING | xxxx | email | t | SENT | t | t | t | 253406 | | ONGOING | MESSAGES_IMPORT_ONGOING | 2024-11-25 23:55:00.079+00 | 0 | 2024-11-25 23:54:18.740525+00 | 2024-11-25 23:55:00.09059+00 | | f3b63ce4-75a3-417a-983f-90fb3a8b92b2|
And you don't have anything inside the message table ?
Did you maybe kill your worker while it was importing?
You can run:
yarn command:prod cron:messaging:ongoing-stale
yarn command:prod cron:calendar:ongoing-stale
This will put back your channels back to pending if for whatever reason they are stuck in ongoing
Could you try removing your connected account and reconnecting it?@Raphaƫl OMG, it started working. I am not sure what made this. What I did was
1) run your
yarn
commands on worker container
2) Remove connected Google account on settings UI
3) Reconnect the account on settings UI
4) run following cron job setting commands
I guess these could be multiple reasons. 1 could be env MESSAGE_QUEUE_TYPE
and timing of setup.
Anyway, thanks!Great ! Happy to have helped š
I encourage you to also run these commands, it will prevent your channels from being stuck if your worker crashes or something else happens š
yarn command:prod cron:messaging:ongoing-stale
yarn command:prod cron:calendar:ongoing-stale
Will do. Appreciated