Skip to content

Commit

Permalink
Merge pull request #345 from nodestream-proj/fix/s3-extractor-read
Browse files Browse the repository at this point in the history
Fix S3 Extractor Closed File
  • Loading branch information
zprobst authored Aug 1, 2024
2 parents 7bac289 + 5d891f4 commit 8dfb14b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nodestream/pipeline/extractors/stores/aws/s3_extractor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from contextlib import asynccontextmanager
from io import IOBase
from io import BytesIO, IOBase
from logging import getLogger
from pathlib import Path
from typing import Iterable, Optional
Expand Down Expand Up @@ -47,7 +47,7 @@ async def as_reader(self, reader: IOBase):
streaming_body = self.s3_client.get_object(Bucket=self.bucket, Key=self.key)[
"Body"
]
yield reader(streaming_body._raw_stream)
yield reader(BytesIO(streaming_body.read()))
self.archive_if_required(self.key)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nodestream"
version = "0.12.5a12"
version = "0.12.5a13"
description = "A Fast, Declarative ETL for Graph Databases."
license = "GPL-3.0-only"
authors = [
Expand Down

0 comments on commit 8dfb14b

Please sign in to comment.