T
Twenty6mo ago
rush

Need Help with Email Sync (v0.4.0)

I am mainly into front-end side of things so not too much idea about back-end side of things. I have provided the following environment variables: FRONT_AUTH_CALLBACK_URL=http://localhost:3001/verify AUTH_GOOGLE_ENABLED=true MESSAGING_PROVIDER_GMAIL_ENABLED=true CALENDAR_PROVIDER_GOOGLE_ENABLED=true AUTH_GOOGLE_CLIENT_ID=my_google_auth_client_id AUTH_GOOGLE_CLIENT_SECRET=client_secret AUTH_GOOGLE_CALLBACK_URL=http://localhost:3000/auth/google/redirect MESSAGING_PROVIDER_GMAIL_CALLBACK_URL=http://localhost:3000/auth/google-gmail/get-access-token AUTH_GOOGLE_APIS_CALLBACK_URL=http://localhost:3000/auth/google-apis/get-access-token MESSAGE_QUEUE_TYPE=pg-boss [email protected] [email protected] EMAIL_FROM_NAME='Name from Domain' EMAIL_DRIVER=logger EMAIL_SMTP_HOST=smtp.gmail.com EMAIL_SMTP_PORT=465 [email protected] EMAIL_SMTP_PASSWORD='my app password with spaces as provided by google' am I missing something or doing something wrong? My email displays in PG Admin and says: query sync status is "PENDING". Please help me figure it out.
10 Replies
Weiko
Weiko6mo ago
Hi @rush, do you have a worker running? Currently the email setup is relying on a worker paired with a redis cache. I'll try to improve the experience this week though
rush
rush6mo ago
I have enabled pg-boss what worker are we talking about? (please don't mind i'm a bit new to all this as a dev)
Weiko
Weiko6mo ago
To run the worker you can use yarn nx worker twenty-server, this is a dedicated app that will execute asynchronous jobs such as the ones that import your emails Note that the experience is much better with redis, pg-boss should work but probably at a slower rate with the current implementation
charles
charles6mo ago
@rush do you still need help? Marking it as solved as other contributors manage to get it running but feel free to ping us if needed here
rush
rush6mo ago
Thank you for the guidance @Weiko I wasn't active since a few days, I'll give it a go and let you know if the problem persists :D) @Weiko I am now on v0.10.0 and have set up my redis cache properly, there seem to be no errors, but the email synch still shows "pending" on the front end (and in my pgadmin messageChannel table). What should I do?
Weiko
Weiko6mo ago
Do you have a worker running? If so, you will need to run a few crons so they can pickup your channel and process the messageIds that should now be in your redis cache (if you want to check, they should be in messaging:messages-to-import) crons should be executed with
node dist/src/command/command cron:messaging:gmail-fetch-messages-from-cache
node dist/src/command/command cron:messaging:gmail-partial-sync
node dist/src/command/command cron:messaging:gmail-fetch-messages-from-cache
node dist/src/command/command cron:messaging:gmail-partial-sync
rush
rush6mo ago
okay, I did this right now, -it is still showing pending is there something I might be overlooking/doing wrong?
Weiko
Weiko6mo ago
Can you check your redis, do you see a key in messaging::messages-to-import:SOME_ID_THERE?
rush
rush6mo ago
it worked for me @Weiko Thanks a lot 😄
Weiko
Weiko6mo ago
Great!
Want results from more Discord servers?
Add your server