Skip to content

Commit

Permalink
Fix circular import in metrics_utils.py (#483)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel McKnight <[email protected]>
  • Loading branch information
NeonDaniel and NeonDaniel authored Nov 10, 2023
1 parent df235bd commit a317071
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions neon_utils/metrics_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@

from socket import gethostname
from time import time, strftime

from neon_utils.logger import LOG
from neon_utils.mq_utils import send_mq_request
from ovos_utils.log import LOG


# TODO: Enable metric reporting DM
Expand Down Expand Up @@ -88,6 +86,7 @@ def report_metric(name: str, **kwargs):
:param kwargs: Arbitrary data to include with metric report
"""
try:
from neon_utils.mq_utils import send_mq_request
send_mq_request("/neon_metrics", {**{"name": name}, **kwargs},
"neon_metrics_input", expect_response=False)
return True
Expand All @@ -98,6 +97,7 @@ def report_metric(name: str, **kwargs):

def announce_connection():
try:
from neon_utils.mq_utils import send_mq_request
from neon_core.version import __version__
from ovos_config.config import Configuration
data = {"time": strftime('%Y-%m-%d %H:%M:%S'),
Expand Down

0 comments on commit a317071

Please sign in to comment.