aboutsummaryrefslogtreecommitdiffstats
path: root/cloud_mdir_sync/gmail.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloud_mdir_sync/gmail.py')
-rw-r--r--cloud_mdir_sync/gmail.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cloud_mdir_sync/gmail.py b/cloud_mdir_sync/gmail.py
index 49468d4..949798b 100644
--- a/cloud_mdir_sync/gmail.py
+++ b/cloud_mdir_sync/gmail.py
@@ -15,6 +15,7 @@ import oauthlib
import requests_oauthlib
from . import config, mailbox, messages, util
+from .util import asyncio_complete
class NativePublicApplicationClient(oauthlib.oauth2.WebApplicationClient):
@@ -424,7 +425,7 @@ class GMailMailbox(mailbox.Mailbox):
msgs.append(msg)
if todo:
start_history_id = await todo[0]
- await asyncio.gather(*todo)
+ await asyncio_complete(*todo)
return (msgs, start_history_id)
@@ -505,7 +506,7 @@ class GMailMailbox(mailbox.Mailbox):
msg.received_time = omsg.received_time
assert self.msgdb.have_content(msg)
msgs.append(msg)
- await asyncio.gather(*todo)
+ await asyncio_complete(*todo)
return (msgs, next_history_id)
@util.log_progress(lambda self: f"Updating Message List for {self.name}",