Sha256: af7b14adf07c2cfac73fc4fddb9b40c3da6203e400885d46dd9e96dbe71006b8

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 Bytes

Contents

# -*- encoding: utf-8 -*-

module Bluepill
  module Application
    module ServerMethods

      def status
        buffer = ""
        self.processes.each do | process |
          buffer << "#{process.name} #{process.state}\n" +
        end
        buffer
      end

      def restart
        self.socket = Bluepill::Socket.new(name, base_dir).client
        socket.send("restart\n", 0)
      end

      def stop
        self.socket = Bluepill::Socket.new(name, base_dir).client
        socket.send("stop\n", 0)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
evented_bluepill-0.0.47 lib/bluepill/application/server.rb