Class: Souffle::Application::Server

Inherits:
Souffle::Application show all
Defined in:
lib/souffle/application/souffle-server.rb

Overview

The souffle server command line parser.

Instance Attribute Summary

Attributes inherited from Souffle::Application

#commands

Instance Method Summary collapse

Methods inherited from Souffle::Application

#configure_logging, #configure_souffle, debug_stacktrace, exit!, fatal!, #reconfigure, #run

Constructor Details

#initializeServer

Grabs all of the cli parameters and generates the mixlib config object.



111
112
113
114
# File 'lib/souffle/application/souffle-server.rb', line 111

def initialize
  super
  Souffle::Config.merge!(config)
end

Instance Method Details

#run_applicationObject

Runs the Souffle Server.



124
125
126
127
128
129
130
# File 'lib/souffle/application/souffle-server.rb', line 124

def run_application
  if Souffle::Config[:daemonize]
    Souffle::Config[:server] = true
    Souffle::Daemon.daemonize("souffle")
  end
  @app.run
end

#setup_applicationObject

Configures the souffle server based on the cli parameters.



117
118
119
120
121
# File 'lib/souffle/application/souffle-server.rb', line 117

def setup_application
  Souffle::Daemon.change_privilege
  Souffle::Config[:server] = true if Souffle::Config[:daemonize]
  @app = Souffle::Server.new
end