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

Simplify example for listing more than 10,000 files #710

Open
wants to merge 1 commit into
base: working
Choose a base branch
from

Conversation

markabur
Copy link

@markabur markabur commented Jun 30, 2017

The old example doesn't actually work as $total is the size of the current batch, not the total number of objects in the container. Since $marker gets set to null when $count equals $total, the example never outputs anything more than one batch of 10,000.

New method simply outputs batch after batch until there are no more files (i.e. it doesn't break until after the last filename). No need to keep track of the overall count or anything like that.

I tried to update the docs too but had some trouble with Sphinx.

@coveralls
Copy link

coveralls commented Jun 30, 2017

Coverage Status

Coverage remained the same at 88.771% when pulling a51f5c8 on markabur:list10k into 8c5cb50 on rackspace:working.

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.

None yet

2 participants