1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-09-03 16:34:33 +00:00

Support loading configuration from database.

This commit is contained in:
cuihaikuo
2017-09-07 17:01:56 +08:00
parent 1dbc15f38e
commit b11f861fbd
25 changed files with 536 additions and 111 deletions

View File

@@ -681,6 +681,31 @@ class SeafileAPI(object):
def mkdir_with_parents (self, repo_id, parent_dir, relative_path, username):
return seafserv_threaded_rpc.mkdir_with_parents(repo_id, parent_dir, relative_path, username)
def get_server_config_int (self, group, key):
return seafserv_threaded_rpc.get_server_config_int (group, key)
def set_server_config_int (self, group, key, value):
return seafserv_threaded_rpc.set_server_config_int (group, key, value)
def get_server_config_int64 (self, group, key):
return seafserv_threaded_rpc.get_server_config_int64 (group, key)
def set_server_config_int64 (self, group, key, value):
return seafserv_threaded_rpc.set_server_config_int64 (group, key, value)
def get_server_config_string (self, group, key):
return seafserv_threaded_rpc.get_server_config_string (group, key)
def set_server_config_string (self, group, key, value):
return seafserv_threaded_rpc.set_server_config_string (group, key, value)
def get_server_config_boolean (self, group, key):
return bool(seafserv_threaded_rpc.get_server_config_boolean (group, key))
def set_server_config_boolean (self, group, key, value):
i_value = 1 if bool(value) else 0
return seafserv_threaded_rpc.set_server_config_boolean (group, key, i_value)
seafile_api = SeafileAPI()
class CcnetAPI(object):