Db threads modify in config interface
This commit is contained in:
parent
1a17645e93
commit
37b8c0241f
3 changed files with 49 additions and 3 deletions
|
@ -191,6 +191,20 @@ class ConfigStorage extends Class
|
|||
{title: "10 threads", value: 10}
|
||||
]
|
||||
|
||||
section.items.push
|
||||
key: "threads_db"
|
||||
title: "Threads for database operations"
|
||||
type: "select"
|
||||
options: [
|
||||
{title: "Sync execution", 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
|
||||
|
|
|
@ -1539,7 +1539,7 @@
|
|||
}
|
||||
]
|
||||
});
|
||||
return section.items.push({
|
||||
section.items.push({
|
||||
key: "threads_crypt",
|
||||
title: "Threads for cryptographic functions",
|
||||
type: "select",
|
||||
|
@ -1568,6 +1568,35 @@
|
|||
}
|
||||
]
|
||||
});
|
||||
return section.items.push({
|
||||
key: "threads_db",
|
||||
title: "Threads for database operations",
|
||||
type: "select",
|
||||
options: [
|
||||
{
|
||||
title: "Sync execution",
|
||||
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
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
ConfigStorage.prototype.createSection = function(title) {
|
||||
|
|
|
@ -22,7 +22,10 @@ class Config(object):
|
|||
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",
|
||||
"threads_fs_read", "threads_fs_write", "threads_crypt"
|
||||
"threads_fs_read", "threads_fs_write", "threads_crypt", "threads_db"
|
||||
])
|
||||
self.keys_restart_need = set([
|
||||
"tor", "fileserver_port", "fileserver_ip_type", "threads_fs_read", "threads_fs_write", "threads_crypt", "threads_db"
|
||||
])
|
||||
self.keys_restart_need = set(["tor", "fileserver_port", "fileserver_ip_type", "threads_fs_read", "threads_fs_write", "threads_crypt"])
|
||||
self.start_dir = self.getStartDir()
|
||||
|
@ -286,8 +289,8 @@ class Config(object):
|
|||
|
||||
self.parser.add_argument('--threads_fs_read', help='Number of threads for file read operations', default=1, type=int)
|
||||
self.parser.add_argument('--threads_fs_write', help='Number of threads for file write operations', default=1, type=int)
|
||||
self.parser.add_argument('--threads_db', help='Number of threads for database operations', default=1, type=int)
|
||||
self.parser.add_argument('--threads_crypt', help='Number of threads for cryptographic operations', default=2, type=int)
|
||||
self.parser.add_argument('--threads_db', help='Number of threads for database operations', default=1, type=int)
|
||||
|
||||
self.parser.add_argument("--download_optional", choices=["manual", "auto"], default="manual")
|
||||
|
||||
|
|
Loading…
Reference in a new issue