Sha256: b7474e7cdd9c612fef05112e7fca6b472f9329b3c0190573f7418a210b110369

Contents?: true

Size: 831 Bytes

Versions: 92

Compression:

Stored size: 831 Bytes

Contents

# frozen_string_literal: true

# tau mutagen socket check
module MutagenSocketCheck
  # Backend method for mutagen socket check.
  # @return [Boolean] Does a mutagen socket exist?
  def mutagen_socket_check(socket)
    log.debug "Check if the mutagen socket \"#{socket}\" exists"

    return false unless mutagen_check_daemon

    socket_exists = _mutagen_socket_check_socket(socket)

    unless socket_exists.exitstatus.zero?
      log.debug "A mutagen socket \"#{socket}\" does not exist"
      return false
    end

    log.debug "The mutagen socket \"#{socket}\" does exist"
    true
  end

  private

  # Get git branch.
  def _mutagen_socket_check_socket(socketname)
    cmd_check_socket = format(
      config.active['cmd_mutagen_forward_socket_check'],
      socketname: socketname
    )
    try cmd_check_socket
  end
end

Version data entries

92 entries across 92 versions & 1 rubygems

Version Path
takeltau-0.46.9 lib/takeltau/mutagen/socket/check.rb
takeltau-0.46.8 lib/takeltau/mutagen/socket/check.rb
takeltau-0.46.5 lib/takeltau/mutagen/socket/check.rb
takeltau-0.46.1 lib/takeltau/mutagen/socket/check.rb
takeltau-0.46.0 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.27 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.26 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.24 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.23 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.22 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.21 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.19 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.17 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.16 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.14 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.13 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.12 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.11 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.10 lib/takeltau/mutagen/socket/check.rb
takeltau-0.45.9 lib/takeltau/mutagen/socket/check.rb