Skip to content

Commit

Permalink
fix(clients): correly parse usage hosts (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3622

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Aug 30, 2024
1 parent cc1dd41 commit 7e7764e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions algoliasearch/usage/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from typing import Optional

from algoliasearch.http.base_config import BaseConfig
from algoliasearch.http.hosts import CallType, Host, HostsCollection
from algoliasearch.http.hosts import Host, HostsCollection
from algoliasearch.http.user_agent import UserAgent


Expand Down Expand Up @@ -32,19 +32,7 @@ def __init__(

self.hosts = HostsCollection(
[
Host(
url="{}-dsn.algolia.net".format(self.app_id),
priority=10,
accept=CallType.READ,
),
Host(
url="{}.algolia.net".format(self.app_id),
priority=10,
accept=CallType.WRITE,
),
Host("{}-1.algolianet.com".format(self.app_id)),
Host("{}-2.algolianet.com".format(self.app_id)),
Host("{}-3.algolianet.com".format(self.app_id)),
],
reorder_hosts=True,
Host("usage.algolia.com"),
Host("usage-dev.algolia.com"),
]
)

0 comments on commit 7e7764e

Please sign in to comment.