diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-05 12:41:32 -0400 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-02-07 11:25:26 -0400 |
commit | f578f75464791e7bfbf6b2544fd8651fe8b6f974 (patch) | |
tree | d46639c402d826874db20e095e30fe77cb1ed055 /cloud_mdir_sync/main.py | |
parent | bf72ac2c33516a951b7b156c10c4e753c781bfc2 (diff) | |
download | cloud_mdir_sync-f578f75464791e7bfbf6b2544fd8651fe8b6f974.tar.gz cloud_mdir_sync-f578f75464791e7bfbf6b2544fd8651fe8b6f974.tar.bz2 cloud_mdir_sync-f578f75464791e7bfbf6b2544fd8651fe8b6f974.zip |
Do not pass msgdb all over the place
The mailboxes can only be linked to a single msgdb, always take it from
the mailbox cfg.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'cloud_mdir_sync/main.py')
-rw-r--r-- | cloud_mdir_sync/main.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloud_mdir_sync/main.py b/cloud_mdir_sync/main.py index ab39676..af179cb 100644 --- a/cloud_mdir_sync/main.py +++ b/cloud_mdir_sync/main.py @@ -28,7 +28,7 @@ def force_local_to_cloud(cfg: config.Config, msgs: messages.MBoxDict_Type): local changes.""" for mbox, msgdict in msgs.items(): if not mbox.same_messages(msgdict): - mbox.force_content(cfg.msgdb, msgdict) + mbox.force_content(msgdict) return msgs @@ -65,7 +65,7 @@ async def synchronize_mail(cfg: config.Config): msgs = None while True: try: - await asyncio.gather(*(mbox.update_message_list(cfg.msgdb) + await asyncio.gather(*(mbox.update_message_list() for mbox in cfg.all_mboxes() if mbox.need_update)) |