Skip to content

Commit

Permalink
fix: druid opt dependency issue
Browse files Browse the repository at this point in the history
Signed-off-by: Avik Basu <ab93@users.noreply.github.com>
  • Loading branch information
ab93 committed Sep 13, 2023
1 parent b3cd337 commit 8d674f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions numalogic/connectors/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from importlib.util import find_spec

from numalogic.connectors._config import (
RedisConf,
PrometheusConf,
Expand All @@ -7,7 +9,6 @@
ConnectorType,
)
from numalogic.connectors.prometheus import PrometheusFetcher
from numalogic.connectors.druid import DruidFetcher

__all__ = [
"RedisConf",
Expand All @@ -17,5 +18,12 @@
"DruidFetcherConf",
"ConnectorType",
"PrometheusFetcher",
"DruidFetcher",
]

try:
find_spec("pydruid")
except (ImportError, ModuleNotFoundError):
pass
else:

__all__.append("DruidFetcher")

0 comments on commit 8d674f9

Please sign in to comment.