Skip to content

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

Open
markabur wants to merge 1 commit intorackspace:workingfrom
markabur:list10k
Open

Simplify example for listing more than 10,000 files#710
markabur wants to merge 1 commit intorackspace:workingfrom
markabur:list10k

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.

2 participants