1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 PERMISSION_VIEW = "materialized_permission_view"
7 def refresh_permission_view
8 ActiveRecord::Base.transaction do
9 ActiveRecord::Base.connection.execute("LOCK TABLE permission_refresh_lock")
10 ActiveRecord::Base.connection.execute("REFRESH MATERIALIZED VIEW #{PERMISSION_VIEW}")