Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move file open() to executor job #123

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Move file open() to executor job #123

merged 1 commit into from
Jun 11, 2024

Conversation

dgomes
Copy link
Collaborator

@dgomes dgomes commented May 13, 2024

Should be broadly tested with large JSON files 1st

@dgomes
Copy link
Collaborator Author

dgomes commented Jun 10, 2024

cc @fvanroie

I think we can move this in

@fvanroie fvanroie merged commit 801e5f6 into main Jun 11, 2024
2 checks passed
def _read_file(self, path):
"""Executor helper to read file."""
with open(path, "r") as src_file:
return src_file.read()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might this be the culprit for #136? Previously, the file handle returned by open was directly passed into send_lines. I presume, iterating over this handle yields lines, whereas read yields a string. And iterating over the string yields single characters. Maybe?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think soo... it was and still is processed by json.load()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants