def _refresh_quota_usages(quota_usage, until_refresh, in_use):
 if (quota_usage.in_use != in_use):
  LOG.info(_LI('quota_usages out of sync, updating. project_id: %(project_id)s, user_id: %(user_id)s, resource: %(res)s, tracked usage: %(tracked_use)s, actual usage: %(in_use)s'), {'project_id': quota_usage.project_id, 'user_id': quota_usage.user_id, 'res': quota_usage.resource, 'tracked_use': quota_usage.in_use, 'in_use': in_use})
 else:
  LOG.debug('QuotaUsage has not changed, refresh is unnecessary for: %s', dict(quota_usage))
 quota_usage.in_use = in_use
 quota_usage.until_refresh = (until_refresh or None)

def _refresh_quota_usages ( quota_usage , until_refresh , in_use ) : if ( quota_usage . in_use != in_use ) : LOG . info ( _LI ( 'quota_usages out of sync, updating. project_id: %(project_id)s, user_id: %(user_id)s, resource: %(res)s, tracked usage: %(tracked_use)s, actual usage: %(in_use)s' ) , { 'project_id' : quota_usage . project_id , 'user_id' : quota_usage . user_id , 'res' : quota_usage . resource , 'tracked_use' : quota_usage . in_use , 'in_use' : in_use } ) else : LOG . debug ( 'QuotaUsage has not changed, refresh is unnecessary for: %s' , dict ( quota_usage ) ) quota_usage . in_use = in_use quota_usage . until_refresh = ( until_refresh or None )
refreshes quota usage for the given resource .