Change fs thread number on config interface
This commit is contained in:
parent
6262c80886
commit
6c31a3b77e
2 changed files with 31 additions and 2 deletions
|
@ -149,6 +149,34 @@ class ConfigStorage extends Class
|
|||
{title: "Only errors", value: "ERROR"}
|
||||
]
|
||||
|
||||
section.items.push
|
||||
key: "threads_fs_read"
|
||||
title: "Threads for async file system reads"
|
||||
type: "select"
|
||||
options: [
|
||||
{title: "Sync read", value: 0}
|
||||
{title: "1 thread", value: 1}
|
||||
{title: "2 threads", value: 2}
|
||||
{title: "3 threads", value: 3}
|
||||
{title: "4 threads", value: 4}
|
||||
{title: "5 threads", value: 5}
|
||||
{title: "10 threads", value: 10}
|
||||
]
|
||||
|
||||
section.items.push
|
||||
key: "threads_fs_write"
|
||||
title: "Threads for async file system writes"
|
||||
type: "select"
|
||||
options: [
|
||||
{title: "Sync write", value: 0}
|
||||
{title: "1 thread", value: 1}
|
||||
{title: "2 threads", value: 2}
|
||||
{title: "3 threads", value: 3}
|
||||
{title: "4 threads", value: 4}
|
||||
{title: "5 threads", value: 5}
|
||||
{title: "10 threads", value: 10}
|
||||
]
|
||||
|
||||
createSection: (title) =>
|
||||
section = {}
|
||||
section.title = title
|
||||
|
|
|
@ -21,9 +21,10 @@ class Config(object):
|
|||
self.need_restart = False
|
||||
self.keys_api_change_allowed = set([
|
||||
"tor", "fileserver_port", "language", "tor_use_bridges", "trackers_proxy", "trackers",
|
||||
"trackers_file", "open_browser", "log_level", "fileserver_ip_type", "ip_external", "offline"
|
||||
"trackers_file", "open_browser", "log_level", "fileserver_ip_type", "ip_external", "offline",
|
||||
"threads_fs_read", "threads_fs_write"
|
||||
])
|
||||
self.keys_restart_need = set(["tor", "fileserver_port", "fileserver_ip_type"])
|
||||
self.keys_restart_need = set(["tor", "fileserver_port", "fileserver_ip_type", "threads_fs_read", "threads_fs_write"])
|
||||
self.start_dir = self.getStartDir()
|
||||
|
||||
self.config_file = self.start_dir + "/zeronet.conf"
|
||||
|
|
Loading…
Reference in a new issue