Remove experimental fork mode

This commit is contained in:
Sdogruyol 2015-12-19 10:00:29 +02:00
parent 20ef2b2927
commit 44af664748
2 changed files with 2 additions and 12 deletions

View File

@ -9,9 +9,6 @@ at_exit do
opts.on("-e ", "--environment ", "environment") do |env|
Kemal.config.env = env
end
opts.on("-w VALUE", "--workers", "workers") do |workers|
Kemal.config.workers = workers.to_i
end
end
config = Kemal.config
@ -39,11 +36,5 @@ at_exit do
File.read(file_path)
end
workers = Kemal.config.workers
if workers > 1
logger.write "Kemal is starting with #{workers} workers!"
server.listen_fork workers: workers
else
server.listen
end
server.listen
end

View File

@ -4,12 +4,11 @@ module Kemal
class Config
INSTANCE = Config.new
HANDLERS = [] of HTTP::Handler
property ssl, port, env, workers, public_folder
property ssl, port, env, public_folder
def initialize
@port = 3000
@env = "development" unless @env
@workers = 1
@public_folder = "./public"
read_file
end