@db_api.retry_if_session_inactive()
@db_api.context_manager.writer
def set_quota_usage_dirty(context, resource, tenant_id, dirty=True):
 query = db_utils.model_query(context, quota_models.QuotaUsage)
 query = query.filter_by(resource=resource).filter_by(tenant_id=tenant_id)
 return query.update({'dirty': dirty})

@ db_api . retry_if_session_inactive ( ) @ db_api . context_manager . writer def set_quota_usage_dirty ( context , resource , tenant_id , dirty = True ) : query = db_utils . model_query ( context , quota_models . QuotaUsage ) query = query . filter_by ( resource = resource ) . filter_by ( tenant_id = tenant_id ) return query . update ( { 'dirty' : dirty } )
set quota usage dirty bit for a given resource and tenant .