new conf parameters serving

This commit is contained in:
Volkan Şahin 2016-07-22 10:38:59 +03:00
parent 7aa5aad801
commit 98dde0a3d1

View file

@ -41,6 +41,27 @@ class System:
config.read(System.Ahenk.config_path()) config.read(System.Ahenk.config_path())
return config.get('BASE', 'dbPath') return config.get('BASE', 'dbPath')
@staticmethod
def agreement_timeout():
config = configparser.ConfigParser()
config._interpolation = configparser.ExtendedInterpolation()
config.read(System.Ahenk.config_path())
return config.get('SESSION', 'agreement_timeout')
@staticmethod
def registration_timeout():
config = configparser.ConfigParser()
config._interpolation = configparser.ExtendedInterpolation()
config.read(System.Ahenk.config_path())
return config.get('SESSION', 'registration_timeout')
@staticmethod
def get_policy_timeout():
config = configparser.ConfigParser()
config._interpolation = configparser.ExtendedInterpolation()
config.read(System.Ahenk.config_path())
return config.get('SESSION', 'get_policy_timeout')
@staticmethod @staticmethod
def plugins_path(): def plugins_path():
config = configparser.ConfigParser() config = configparser.ConfigParser()
@ -89,7 +110,7 @@ class System:
def received_dir_path(): def received_dir_path():
path = '/tmp/.ahenk/' path = '/tmp/.ahenk/'
if Util.is_exist(path) is False: if Util.is_exist(path) is False:
#TODO write permission add # TODO write permission add
Util.create_directory(path) Util.create_directory(path)
return path return path