Skip to content

Commit

Permalink
🐛 fix(client): as completed
Browse files Browse the repository at this point in the history
  • Loading branch information
ljnsn committed Apr 28, 2024
1 parent d5428f1 commit 0b627e9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dsws_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def fetch_one(
Returns:
A data response.
"""
logger.debug("fetching one")
return self._execute_request(
DSGetDataRequest(
token_value=self.token,
Expand All @@ -159,6 +160,7 @@ def fetch_bundle(
Returns:
A data bundle response.
"""
logger.debug("fetching bundle")
return self._execute_request(
DSGetDataBundleRequest(
token_value=self.token,
Expand Down Expand Up @@ -194,9 +196,8 @@ def fetch_all_threaded(
futures = [
executor.submit(self.fetch_bundle, bundle) for bundle in request_bundles
]
return (
future.result() for future in concurrent.futures.as_completed(futures)
)
for future in concurrent.futures.as_completed(futures):
yield future.result()

def fetch_token(self, **kwargs: object) -> Token:
"""
Expand Down Expand Up @@ -299,6 +300,7 @@ def _execute_request(
response_cls: Type[ResponseCls],
) -> ResponseCls:
"""Execute a request."""
logger.debug("executing request")
if self._app_id is not None:
request.properties.append(DSStringKVPair("__AppId", self._app_id))
if self._data_source is not None:
Expand Down

0 comments on commit 0b627e9

Please sign in to comment.