Remove threading completely from sync_mailinglists

parent 85a9000a
"""GSuite syncing helpers defined by the mailinglists package"""
import logging
from concurrent.futures import wait
from concurrent.futures.thread import ThreadPoolExecutor
from time import sleep
from typing import List
......@@ -310,16 +308,11 @@ class GSuiteSyncService:
remove_list = [x for x in existing_groups if x not in new_groups]
insert_list = [x for x in new_groups if x not in existing_groups]
executor = ThreadPoolExecutor(max_workers=4)
futures = []
for l in lists:
if in insert_list and not in archived_groups:
futures.append(executor.submit(self.create_group, l))
elif len(l.addresses) > 0:
futures.append(executor.submit(self.update_group,, l))
self.update_group(, l)
for l in remove_list:
futures.append(executor.submit(self.delete_group, l))
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment