Skip to content

Commit

Permalink
use httpx for usage tracking
Browse files Browse the repository at this point in the history
Co-Authored-By: Judah Rand <17158624+judahrand@users.noreply.github.com>
  • Loading branch information
sauyon and judahrand committed Oct 10, 2023
1 parent b05de32 commit f0dc2b2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/bentoml/_internal/utils/analytics/usage_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from typing import TYPE_CHECKING

import attr
import requests
import httpx
from simple_di import Provide
from simple_di import inject

Expand Down Expand Up @@ -122,9 +122,7 @@ def track(event_properties: EventMeta):
logger.info("Tracking Payload: %s", payload)
return

requests.post(
USAGE_TRACKING_URL, json=payload, timeout=USAGE_REQUEST_TIMEOUT_SECONDS
)
httpx.post(USAGE_TRACKING_URL, json=payload, timeout=USAGE_REQUEST_TIMEOUT_SECONDS)


@inject
Expand Down

0 comments on commit f0dc2b2

Please sign in to comment.