Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: gotta await
Signed-off-by: robhowley <rhowley@seatgeek.com>
  • Loading branch information
robhowley committed May 31, 2024
commit eeb3929852a4bbf159bf1034b9ba4e1badc49a1c
8 changes: 4 additions & 4 deletions sdk/python/feast/infra/online_stores/dynamodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def online_write_batch(
self._write_batch_non_duplicates(table_instance, data, progress, config)

def _read_batches(
self, online_config, entity_ids, table_name, table_client
self, online_config, entity_ids, table_name, batch_get_item
) -> List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]]:
result: List[Tuple[Optional[datetime], Optional[Dict[str, ValueProto]]]] = []

Expand All @@ -229,7 +229,7 @@ def _read_batches(
"ConsistentRead": online_config.consistent_reads,
}
}
response = table_client.batch_get_item(
response = batch_get_item.batch_get_item(
RequestItems=batch_entity_ids,
)
response = response.get("Responses")
Expand Down Expand Up @@ -297,7 +297,7 @@ def online_read(
online_config,
entity_ids,
table_instance.name,
dynamodb_resource,
dynamodb_resource.batch_get_item,
)

async def online_read_async(
Expand Down Expand Up @@ -337,7 +337,7 @@ async def online_read_async(
online_config,
entity_ids,
_get_table_name(online_config, config, table),
client,
lambda **kwargs: (await client(**kwargs)),
)

def _get_aioboto_session(self):
Expand Down