mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Remove experimental fork mode
This commit is contained in:
parent
20ef2b2927
commit
44af664748
2 changed files with 2 additions and 12 deletions
|
@ -9,9 +9,6 @@ at_exit do
|
||||||
opts.on("-e ", "--environment ", "environment") do |env|
|
opts.on("-e ", "--environment ", "environment") do |env|
|
||||||
Kemal.config.env = env
|
Kemal.config.env = env
|
||||||
end
|
end
|
||||||
opts.on("-w VALUE", "--workers", "workers") do |workers|
|
|
||||||
Kemal.config.workers = workers.to_i
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
config = Kemal.config
|
config = Kemal.config
|
||||||
|
@ -39,11 +36,5 @@ at_exit do
|
||||||
File.read(file_path)
|
File.read(file_path)
|
||||||
end
|
end
|
||||||
|
|
||||||
workers = Kemal.config.workers
|
|
||||||
if workers > 1
|
|
||||||
logger.write "Kemal is starting with #{workers} workers!"
|
|
||||||
server.listen_fork workers: workers
|
|
||||||
else
|
|
||||||
server.listen
|
server.listen
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,12 +4,11 @@ module Kemal
|
||||||
class Config
|
class Config
|
||||||
INSTANCE = Config.new
|
INSTANCE = Config.new
|
||||||
HANDLERS = [] of HTTP::Handler
|
HANDLERS = [] of HTTP::Handler
|
||||||
property ssl, port, env, workers, public_folder
|
property ssl, port, env, public_folder
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@port = 3000
|
@port = 3000
|
||||||
@env = "development" unless @env
|
@env = "development" unless @env
|
||||||
@workers = 1
|
|
||||||
@public_folder = "./public"
|
@public_folder = "./public"
|
||||||
read_file
|
read_file
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue