Skip to content

Commit

Permalink
fix issue with lazy post-sync
Browse files Browse the repository at this point in the history
  • Loading branch information
adorton-adobe committed Mar 25, 2020
1 parent e619033 commit 7f743d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion user_sync/post_sync/connectors/sign_sync/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def run(self, post_sync_data):
return
for org_name, sign_client in self.clients.items():
# create any new Sign groups
for new_group in set(self.user_groups[org_name]) - set(sign_client.groups):
for new_group in set(self.user_groups[org_name]) - set(sign_client.sign_groups()):
self.logger.info("Creating new Sign group: {}".format(new_group))
sign_client.create_group(new_group)
umapi_users = post_sync_data.umapi_data.get(org_name)
Expand Down
5 changes: 5 additions & 0 deletions user_sync/post_sync/connectors/sign_sync/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ def _init(self):
self.api_url = self.base_uri()
self.groups = self.get_groups()

def sign_groups(self):
if self.api_url is None or self.groups is None:
self._init()
return self.groups

def logger_name(self):
return 'sign_client.{}'.format(self.console_org if self.console_org else 'main')

Expand Down

0 comments on commit 7f743d9

Please sign in to comment.