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

add missing offset in iter_chunked #87

Merged
merged 1 commit into from
Sep 20, 2023
Merged

Conversation

honglei
Copy link
Contributor

@honglei honglei commented Sep 20, 2023

iter_chunked will always start with offset=0, the seek func not work.

from aiofile import async_open

async def test(path: str, restart_offset: int):
    BLOCK_SIZE = 8192
    async with async_open(
                    path, "rb"
        ) as file_out:
        file_out.seek(restart_offset)
        async for chunk in file_out.iter_chunked(BLOCK_SIZE):
            #pass

@mosquito mosquito merged commit 549d63c into mosquito:master Sep 20, 2023
19 checks passed
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.

2 participants