Skip to content

Commit

Permalink
potentially pathetic attempt to fix this async issue
Browse files Browse the repository at this point in the history
  • Loading branch information
themarcelor committed Jan 22, 2021
1 parent a60cf4e commit a73ffd4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion fence/sync/sync_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
from fence.resources.google.access_utils import bulk_update_google_groups
from fence.sync import utils

import asyncio


def _format_policy_id(path, privilege):
resource = ".".join(name for name in path.split("/") if name)
Expand Down Expand Up @@ -1608,7 +1610,13 @@ def _update_authz_in_arborist(self, session, user_projects, user_yaml=None):
)
continue
try:
self.arborist_client.update_client(client.client_id, client_policies)
loop = asyncio.get_event_loop()
loop.run_until_complete(
self.arborist_client.update_client(
client.client_id, client_policies
)
)
loop.close()
except ArboristError as e:
self.logger.info(
"not granting policies {} to client `{}`; {}".format(
Expand Down

0 comments on commit a73ffd4

Please sign in to comment.