Sha256: efe2f2bc34b2a138946626e2787311c2c2c1735e5b22e9a641a7519baa6de6dd

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

include Capistrano::DSL

module Dkdeploy
  module Helpers
    # Helpers for MySQL slow_log tasks
    module MySQL
      # checks for existence of mysql_sloq_log on server and prints error message if not present
      # @param file_path [String]
      # @return [Boolean]
      def slow_log_exists?(file_path)
        return true if !file_path.empty? && test("[ -f #{file_path} ]")

        error I18n.t('file.not_exists_or_not_accessible_on_host', file: file_path, host: server, scope: :dkdeploy)
        false
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dkdeploy-core-9.2.1 lib/dkdeploy/helpers/mysql.rb