Small renames to make team syncing code more clear

This commit is contained in:
Joseph Schorr 2017-03-20 16:49:20 -04:00
parent 7f0aa19292
commit 103186f5e8
3 changed files with 7 additions and 7 deletions

View file

@ -45,8 +45,8 @@ def sync_team(authentication, stale_team_sync):
extra={'team': stale_team_sync.team_id, 'sync_config': sync_config})
# Load all the existing members of the team in Quay that are bound to the auth service.
existing_users = model.team.list_federated_team_members(stale_team_sync.team,
authentication.federated_service)
existing_users = model.team.get_federated_team_member_mapping(stale_team_sync.team,
authentication.federated_service)
logger.debug('Existing membership of %s for team `%s` under organization %s via %s (#%s)',
len(existing_users), stale_team_sync.team.name,
@ -109,8 +109,8 @@ def sync_team(authentication, stale_team_sync):
# Update the transaction and last_updated time of the team sync. Only if it matches
# the current value will we then perform the deletion step.
result = model.team.update_sync_status(stale_team_sync)
if not result:
got_transaction_handle = model.team.update_sync_status(stale_team_sync)
if not got_transaction_handle:
# Another worker updated this team. Nothing more to do.
logger.debug('Another worker synced team `%s` under organization %s via %s (#%s)',
stale_team_sync.team.name,