debian-mirror-gitlab/lib/gitlab/memory/watchdog/handlers/null_handler.rb
2023-04-23 21:23:45 +05:30

24 lines
650 B
Ruby

# frozen_string_literal: true
module Gitlab
module Memory
class Watchdog
module Handlers
# This handler does nothing. It returns `false` to indicate to the
# caller that the situation has not been dealt with so it will
# receive calls repeatedly if fragmentation remains high.
#
# This is useful for "dress rehearsals" in production since it allows
# us to observe how frequently the handler is invoked before taking action.
class NullHandler
include Singleton
def call
# NOP
false
end
end
end
end
end
end