def __init__(self):
self._classification_rules = {}
self._exclusion_rules = {}
self._enrichment_rules = {}
self._routing_rules = {}
self._config = None
try:
# TODO: Absolute path? Where should this live?
with open('config/klaxer.yml', 'r') as ymlfile:
self._config = yaml.load(ymlfile)
except yaml.YAMLError as ye:
raise ConfigurationError('failed to parse config') from ye
for section in self._config:
# Subsequent definitions of the same service will overwrite the
# previous ones.
self._build_rules(section)
评论列表
文章目录