Procedure to sync emails? 0.10.0
Always loving new updates! & congrats on 10k stars!
I've installed a fresh 0.10.0 on my test ubuntu VM in docker. I do this before migrating in case i stuff something up.
im running my usual config, i have redis server running and seems to be working (no errors)
first thing i noticed was when connecting emails (gmail) it now has a status of "not synced" how do we get it to sync?
19 Replies
You'll need to set the cron working:
yarn command:prod cron:messaging:gmail-fetch-messages-from-cache
yarn command:prod cron:messaging:gmail-partial-sync
I've ran that, everything initialized. is there something else i need to do? or just wait?
can you see the logs of your worker?
oh, and make sure your workspace subscriptionStatus is 'active'
we forgot to remove this check for self-hosting
"fbeedd91-a56f-4898-af3e-123123123" "mycompany" "workspace-logo/original/4a452104-70ab-406e-8a76-7123ab3b123c8.jpg" "123123-ea59-48d7-89bb-123123a86e2cd" "2024-04-23 14:10:30.586262+00" "2024-04-23 14:10:51.646095+00" true "active"
(slighty modified) but thats the row from the workspace table (i changed it to active)
as for the logs, do you mean inside the twenty-server-1 container?
after running the yarn commands ?
i ran the 2 commands, everything said initialized.
the container logs look like this:
You also need to run the worker separately: yarn worker:prod
in a separate terminal/process
Okay i can see it the worker running. throwing some errors from the demo workspaces.
it did sync some emails and contacts. but it now says failed on the email, not syncing.
and it did import some contacts, not all. and not all email messages are showing.
do i need the terminal always open to sync emails? closed the terminal. added a new email but that is now not synced.
mmmh ok, we have ongoing bug on the emails, I'm looking into them, you might be running into them too
I have fixed the issue, I'm sure it's working so I can help you troubleshoot if it's not working
could you try to remove your connected account and add it again?
also keep an eye on the worker to see if everything looks normal. You should see that xxxx emails will be imported and then it should try to import it 10 by 10
(make sure to use v0.10.1 container)
oh yes! it worked. took an hour or so to sync. and it now says "succeeded"
how do we run the worker in the background with out having the terminal opened
you'll need to run another container which run command would be yarn worker:prod
as in twenty-server-2 container running
yarn worker:prod
command ?yes
or you can also use something like pm2 to keep both process running in the same container https://pm2.keymetrics.io/
PM2 - Home
Advanced process manager for production Node.js applications. Load balancer, logs facility, startup script, micro service management, at a glance.
so something like this?
yes!
that worked well. Can't wait to see this all come together. This is defienly the longest docker-compose file i've got.