Sha256: f438c905dfa4c00e218c6c0aa57cd0dbc65a7148a12153f7ea2b950d041ca6d0

Contents?: true

Size: 826 Bytes

Versions: 6

Compression:

Stored size: 826 Bytes

Contents

# frozen_string_literal: true

# takeltau mutagen socket terminate
module MutagenSocketTerminate
  # Backend method for mutagen socket terminate.
  def mutagen_socket_terminate(socket)
    log.debug "Terminate the mutagen socket \"#{socket}\""

    return false unless mutagen_check_daemon

    socket_terminated = _mutagen_socket_terminate_socket socket

    unless socket_terminated.exitstatus.zero?
      log.debug "Unable to terminated mutagen socket \"#{socket}\""
      return false
    end

    log.debug "Terminated the mutagen socket \"#{socket}\""
    true
  end

  private

  # Get git branch.
  def _mutagen_socket_terminate_socket(socketname)
    cmd_terminate_socket = format(
      config.active['cmd_mutagen_forward_socket_terminate'],
      socketname: socketname
    )
    try cmd_terminate_socket
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
takeltau-0.34.15 lib/takeltau/mutagen/socket/terminate.rb
takeltau-0.34.14 lib/takeltau/mutagen/socket/terminate.rb
takeltau-0.34.13 lib/takeltau/mutagen/socket/terminate.rb
takeltau-0.34.12 lib/takeltau/mutagen/socket/terminate.rb
takeltau-0.34.11 lib/takeltau/mutagen/socket/terminate.rb
takeltau-0.34.9 lib/takeltau/mutagen/socket/terminate.rb