Skip to content

Commit

Permalink
feat(generators): allow per-spec timeouts [skip-bc] (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#4173

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
Co-authored-by: Thomas Raffray <Fluf22@users.noreply.github.com>
  • Loading branch information
4 people committed Dec 5, 2024
1 parent d6f7670 commit 0f16505
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 0 deletions.
5 changes: 5 additions & 0 deletions algoliasearch/abtesting/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ def __init__(
) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("Abtesting", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/analytics/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ def __init__(
) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("Analytics", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/ingestion/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ def __init__(
) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 25000
self.write_timeout = 25000
self.connect_timeout = 25000

self._user_agent = UserAgent()
self.add_user_agent("Ingestion", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/insights/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ def __init__(
) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("Insights", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/monitoring/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ class MonitoringConfig(BaseConfig):
def __init__(self, app_id: Optional[str], api_key: Optional[str]) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("Monitoring", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/personalization/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ def __init__(
) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("Personalization", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/query_suggestions/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ def __init__(
) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("QuerySuggestions", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/recommend/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ class RecommendConfig(BaseConfig):
def __init__(self, app_id: Optional[str], api_key: Optional[str]) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("Recommend", __version__)

Expand Down
5 changes: 5 additions & 0 deletions algoliasearch/search/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ class SearchConfig(BaseConfig):
def __init__(self, app_id: Optional[str], api_key: Optional[str]) -> None:
super().__init__(app_id, api_key)

# In milliseconds
self.read_timeout = 5000
self.write_timeout = 30000
self.connect_timeout = 2000

self._user_agent = UserAgent()
self.add_user_agent("Search", __version__)

Expand Down

0 comments on commit 0f16505

Please sign in to comment.