本文整理汇总了Python中jasmin.config.tools.ConfigFile.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ConfigFile.__init__方法的具体用法?Python ConfigFile.__init__怎么用?Python ConfigFile.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jasmin.config.tools.ConfigFile
的用法示例。
在下文中一共展示了ConfigFile.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file = None):
ConfigFile.__init__(self, config_file)
self.id = self._get('smpp-server', 'id', 'smpps_01')
self.bind = self._get('smpp-server', 'bind', '0.0.0.0')
self.port = self._getint('smpp-server', 'port', 2775)
# Logging
self.log_level = logging.getLevelName(self._get('smpp-server', 'log_level', 'INFO'))
self.log_file = self._get('smpp-server', 'log_file', '/var/log/jasmin/default-%s.log' % self.id)
self.log_rotate = self._get('smpp-server', 'log_rotate', 'midnight')
self.log_format = self._get('smpp-server', 'log_format', '%(asctime)s %(levelname)-8s %(process)d %(message)s')
self.log_date_format = self._get('smpp-server', 'log_date_format', '%Y-%m-%d %H:%M:%S')
# Timeout for response to bind request
self.sessionInitTimerSecs = self._getint('smpp-server', 'sessionInitTimerSecs', 30)
# Enquire link interval
self.enquireLinkTimerSecs = self._getint('smpp-server', 'enquireLinkTimerSecs', 30)
# Maximum time lapse allowed between transactions, after which, the connection is considered as inactive
self.inactivityTimerSecs = self._getint('smpp-server', 'inactivityTimerSecs', 300)
# Timeout for responses to any request PDU
self.responseTimerSecs = self._getint('smpp-server', 'responseTimerSecs', 60)
# Timeout for reading a single PDU, this is the maximum lapse of time between
# receiving PDU's header and its complete read, if the PDU reading timed out,
# the connection is considered as 'corrupt' and will reconnect
self.pduReadTimerSecs = self._getint('smpp-server', 'pduReadTimerSecs', 10)
# DLR
# How much time a message is kept in redis waiting for receipt
self.dlr_expiry = self._getint('smpp-server', 'dlr_expiry', 86400)
示例2: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file):
ConfigFile.__init__(self, config_file)
self.log_level = logging.getLevelName(self._get('service-smppclient', 'log_level', 'INFO'))
self.log_file = self._get('services-smppclient', 'log_file', '/var/log/jasmin/service-smppclient.log')
self.log_format = self._get('services-smppclient', 'log_format', '%(asctime)s %(levelname)-8s %(process)d %(message)s')
self.log_date_format = self._get('services-smppclient', 'log_date_format', '%Y-%m-%d %H:%M:%S')
示例3: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file=None):
ConfigFile.__init__(self, config_file)
self.publish_submit_sm_resp = self._getbool('sm-listener', 'publish_submit_sm_resp', False)
self.submit_error_retrial = ast.literal_eval(
self._get(
'sm-listener',
'submit_error_retrial',
"""{'ESME_RSYSERR': {'count': 2, 'delay': 30},
'ESME_RTHROTTLED': {'count': 20, 'delay': 30},
'ESME_RMSGQFUL': {'count': 2, 'delay': 180},
'ESME_RINVSCHED': {'count': 2, 'delay': 300},
}"""))
self.submit_max_age_smppc_not_ready = self._getint(
'sm-listener', 'submit_max_age_smppc_not_ready', 1200)
self.submit_retrial_delay_smppc_not_ready = self._getint(
'sm-listener', 'submit_retrial_delay_smppc_not_ready', False)
self.dlr_lookup_retry_delay = self._getint(
'sm-listener', 'dlr_lookup_retry_delay', 10)
self.dlr_lookup_retry_delay = self._getint(
'sm-listener', 'dlr_lookup_max_retries', 2)
self.log_level = logging.getLevelName(self._get('sm-listener', 'log_level', 'INFO'))
self.log_file = self._get('sm-listener', 'log_file', '%s/var/log/jasmin/messages.log' % ROOT_PATH)
self.log_rotate = self._get('sm-listener', 'log_rotate', 'midnight')
self.log_format = self._get('sm-listener', 'log_format', DEFAULT_LOGFORMAT)
self.log_date_format = self._get('sm-listener', 'log_date_format', '%Y-%m-%d %H:%M:%S')
示例4: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file=None):
ConfigFile.__init__(self, config_file)
self.host = self._get("interceptor-client", "host", "127.0.0.1")
self.port = self._getint("interceptor-client", "port", 8987)
self.username = self._get("interceptor-client", "username", "iadmin")
self.password = self._get("interceptor-client", "password", "ipwd")
示例5: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file=None):
ConfigFile.__init__(self, config_file)
self.host = self._get('smpp-server-pb-client', 'host', '127.0.0.1')
self.port = self._getint('smpp-server-pb-client', 'port', 14000)
self.username = self._get('smpp-server-pb-client', 'username', 'smppsadmin')
self.password = self._get('smpp-server-pb-client', 'password', 'smppspwd')
示例6: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file = None):
ConfigFile.__init__(self, config_file)
self.timeout = self._getint('dlr-thrower', 'http_timeout', 30)
self.retry_delay = self._getint('dlr-thrower', 'retry_delay', 30)
self.max_retries = self._getint('dlr-thrower', 'max_retries', 3)
# Logging
self.log_level = logging.getLevelName(self._get('dlr-thrower', 'log_level', 'INFO'))
self.log_file = self._get('dlr-thrower', 'log_file', '/var/log/jasmin/dlr-thrower.log')
self.log_format = self._get('dlr-thrower', 'log_format', '%(asctime)s %(levelname)-8s %(process)d %(message)s')
self.log_date_format = self._get('dlr-thrower', 'log_date_format', '%Y-%m-%d %H:%M:%S')
示例7: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file = None):
ConfigFile.__init__(self, config_file)
self.host = self._getint('redis-client', 'host', '127.0.0.1')
self.port = self._getint('redis-client', 'port', 6379)
self.dbid = self._getint('redis-client', 'dbid', '1')
self.password = self._getint('redis-client', 'password', None)
self.poolsize = self._getint('redis-client', 'poolsize', 10)
self.log_level = logging.getLevelName(self._get('redis-client', 'log_level', 'INFO'))
self.log_file = self._get('redis-client', 'log_file', '/var/log/jasmin/redis-client.log')
self.log_format = self._get('redis-client', 'log_format', '%(asctime)s %(levelname)-8s %(process)d %(message)s')
self.log_date_format = self._get('redis-client', 'log_date_format', '%Y-%m-%d %H:%M:%S')
示例8: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file = None):
ConfigFile.__init__(self, config_file)
self.bind = self._get('jcli', 'bind', '127.0.0.1')
self.port = self._getint('jcli', 'port', 8990)
self.authentication = self._getint('jcli', 'authentication', True)
self.admin_username = self._get('jcli', 'admin_username', 'jcliadmin')
self.admin_password = self._get('jcli', 'admin_password', '79e9b0aa3f3e7c53e916f7ac47439bcb').decode('hex')
self.log_level = logging.getLevelName(self._get('jcli', 'log_level', 'INFO'))
self.log_file = self._get('jcli', 'log_file', '/var/log/jasmin/jcli.log')
self.log_format = self._get('jcli', 'log_format', '%(asctime)s %(levelname)-8s %(process)d %(message)s')
self.log_date_format = self._get('jcli', 'log_date_format', '%Y-%m-%d %H:%M:%S')
示例9: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file=None):
ConfigFile.__init__(self, config_file)
self.timeout = self._getint("deliversm-thrower", "http_timeout", 30)
self.retry_delay = self._getint("deliversm-thrower", "retry_delay", 30)
self.max_retries = self._getint("deliversm-thrower", "max_retries", 3)
# Logging
self.log_level = logging.getLevelName(self._get("deliversm-thrower", "log_level", "INFO"))
self.log_file = self._get("deliversm-thrower", "log_file", "/var/log/jasmin/deliversm-thrower.log")
self.log_rotate = self._get("deliversm-thrower", "log_rotate", "W6")
self.log_format = self._get(
"deliversm-thrower", "log_format", "%(asctime)s %(levelname)-8s %(process)d %(message)s"
)
self.log_date_format = self._get("deliversm-thrower", "log_date_format", "%Y-%m-%d %H:%M:%S")
示例10: __init__
# 需要导入模块: from jasmin.config.tools import ConfigFile [as 别名]
# 或者: from jasmin.config.tools.ConfigFile import __init__ [as 别名]
def __init__(self, config_file = None):
ConfigFile.__init__(self, config_file)
self.timeout = self._getint('dlr-thrower', 'http_timeout', 30)
self.retry_delay = self._getint('dlr-thrower', 'retry_delay', 30)
self.max_retries = self._getint('dlr-thrower', 'max_retries', 3)
#139: need configuration to send deliver_sm instead of data_sm for SMPP delivery receipt
# 20150521: it seems better to get deliver_sm the default pdu for receipts
self.dlr_pdu = self._get('dlr-thrower', 'dlr_pdu', 'deliver_sm')
# Logging
self.log_level = logging.getLevelName(self._get('dlr-thrower', 'log_level', 'INFO'))
self.log_file = self._get('dlr-thrower', 'log_file', '/var/log/jasmin/dlr-thrower.log')
self.log_format = self._get('dlr-thrower', 'log_format', '%(asctime)s %(levelname)-8s %(process)d %(message)s')
self.log_date_format = self._get('dlr-thrower', 'log_date_format', '%Y-%m-%d %H:%M:%S')