Skip to content

Commit 7e7764e

Browse files
fix(clients): correly parse usage hosts (generated)
algolia/api-clients-automation#3622 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent cc1dd41 commit 7e7764e

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

algoliasearch/usage/config.py

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from typing import Optional
33

44
from algoliasearch.http.base_config import BaseConfig
5-
from algoliasearch.http.hosts import CallType, Host, HostsCollection
5+
from algoliasearch.http.hosts import Host, HostsCollection
66
from algoliasearch.http.user_agent import UserAgent
77

88

@@ -32,19 +32,7 @@ def __init__(
3232

3333
self.hosts = HostsCollection(
3434
[
35-
Host(
36-
url="{}-dsn.algolia.net".format(self.app_id),
37-
priority=10,
38-
accept=CallType.READ,
39-
),
40-
Host(
41-
url="{}.algolia.net".format(self.app_id),
42-
priority=10,
43-
accept=CallType.WRITE,
44-
),
45-
Host("{}-1.algolianet.com".format(self.app_id)),
46-
Host("{}-2.algolianet.com".format(self.app_id)),
47-
Host("{}-3.algolianet.com".format(self.app_id)),
48-
],
49-
reorder_hosts=True,
35+
Host("usage.algolia.com"),
36+
Host("usage-dev.algolia.com"),
37+
]
5038
)

0 commit comments

Comments
 (0)