Compare commits
No commits in common. "4e6cc13773284ffb57736f939de0297ec1651366" and "a9adfa5cb1e83bf676ff758101ebb037739a8a9e" have entirely different histories.
4e6cc13773
...
a9adfa5cb1
|
@ -317,15 +317,15 @@ def metric_config_gen(module, class_name_str):
|
||||||
"""
|
"""
|
||||||
Generate metric config for nameko services.
|
Generate metric config for nameko services.
|
||||||
"""
|
"""
|
||||||
import sys
|
|
||||||
from statsd.client.timer import Timer
|
from statsd.client.timer import Timer
|
||||||
sys.path.append('/home/ubuntu/namekoplus-examples')
|
|
||||||
|
import sys
|
||||||
click.echo(f'sys.path: {sys.path}')
|
click.echo(f'sys.path: {sys.path}')
|
||||||
|
|
||||||
# Extract information of statsd config from the class of nameko service
|
# Extract information of statsd config from the class of nameko service
|
||||||
dest_dir = module.split('.')[0]
|
dest_dir = module.split('.')[0]
|
||||||
file_name = module.split('.')[-1]
|
file_name = module.split('.')[-1]
|
||||||
_module = importlib.import_module(module)
|
_module = importlib.import_module(name='.'+file_name, package=dest_dir)
|
||||||
config_list = []
|
config_list = []
|
||||||
for class_name in class_name_str.split(','):
|
for class_name in class_name_str.split(','):
|
||||||
members = inspect.getmembers(getattr(getattr(_module, file_name), class_name), predicate=inspect.isfunction)
|
members = inspect.getmembers(getattr(getattr(_module, file_name), class_name), predicate=inspect.isfunction)
|
||||||
|
|
Loading…
Reference in New Issue