mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 04:19:18 +08:00
fix unit test and code style changes
This commit is contained in:
parent
cf6df18446
commit
2ab0e0eb93
@ -25,6 +25,7 @@ def app(request):
|
||||
yield app
|
||||
|
||||
db.drop_all()
|
||||
app.stop()
|
||||
# shutil.rmtree(tpath)
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ import os
|
||||
import logging
|
||||
from functools import partial
|
||||
from pluginbase import PluginBase
|
||||
from tracer import Tracer
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -13,14 +14,15 @@ PLUGIN_PACKAGE_NAME = 'tracer.plugins'
|
||||
plugin_base = PluginBase(package=PLUGIN_PACKAGE_NAME,
|
||||
searchpath=[get_path('./plugins')])
|
||||
|
||||
|
||||
class TracerFactory(object):
|
||||
def __init__(self, searchpath=None):
|
||||
self.plugin_package_name = PLUGIN_PACKAGE_NAME
|
||||
self.tracer_map = {}
|
||||
searchpath = searchpath if searchpath else []
|
||||
searchpath = [searchpath] if isinstance(searchpath, str) else searchpath
|
||||
self.source = plugin_base.make_plugin_source(
|
||||
searchpath=searchpath, identifier=self.__class__.__name__)
|
||||
self.source = plugin_base.make_plugin_source(searchpath=searchpath,
|
||||
identifier=self.__class__.__name__)
|
||||
|
||||
for plugin_name in self.source.list_plugins():
|
||||
plugin = self.source.load_plugin(plugin_name)
|
||||
|
@ -8,6 +8,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
PLUGIN_NAME = __file__
|
||||
|
||||
|
||||
class JaegerFactory:
|
||||
name = 'jaeger'
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user