Class: Hokusai::Automation::Server

Inherits:
Object
  • Object
show all
Defined in:
ui/src/hokusai/automation/server.rb

Class Method Summary collapse

Class Method Details

.start(*args, driver: Hokusai::Automation::Driver.new) ⇒ Object



98
99
100
101
102
103
104
105
# File 'ui/src/hokusai/automation/server.rb', line 98

def self.start(*args, driver: Hokusai::Automation::Driver.new)
  app = App.new(driver)

  @socket = Thin::Server.new(*args, app)
  Hokusai::ThreadPool.post do
    @socket.start
  end
end

.stopObject



107
108
109
110
111
# File 'ui/src/hokusai/automation/server.rb', line 107

def self.stop
  @socket.stop

  Hokusai::ThreadPool.prune_pool
end