X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b2a8e117cd2a02851c69136f76a1e63005386f1d..0561bd0c3c07257fd58ded6c7cfa5feeae97af57:/apps/workbench/app/controllers/keep_disks_controller.rb diff --git a/apps/workbench/app/controllers/keep_disks_controller.rb b/apps/workbench/app/controllers/keep_disks_controller.rb index f57455b37f..c95ebdc255 100644 --- a/apps/workbench/app/controllers/keep_disks_controller.rb +++ b/apps/workbench/app/controllers/keep_disks_controller.rb @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class KeepDisksController < ApplicationController def create defaults = { is_readable: true, is_writable: true } @@ -32,6 +36,7 @@ class KeepDisksController < ApplicationController histogram_log = Log. filter([[:event_type, '=', 'block-age-free-space-histogram']]). order(:created_at => :desc). + with_count('none'). limit(1) histogram_log.each do |log_entry| # We expect this block to only execute at most once since we