Closed NordomWhistleklik closed 9 years ago
@NordomWhistleklik while the tests are not finished, I'm pretty sure they'll fail or lose coverage somewhere here. If you want I can re-implement this with tests or you can add tests for this. Might I suggest to extract everything in the while loop out into a separate method as well? I can do this after the PR to if you have difficulties doing this.
Sorry, didn't mean to submit a buggy or incomplete PR. I'm fairly new to Github collaboration. Feel free to re-implement with tests and however see fit. I was just banging my head against a wall trying to figure out what was going wrong and I was happy I found a solution I could share.
@NordomWhistleklik no worries. I've implemented it in a slight different way, with tests. Can you verify this fix?
I don't believe your change (1104887e3bcbda5c9f4c786c07a216046490ba27) works. After a couple seconds my server runs out of memory. If I'm reading it right, it's just requesting the same objectList over and over again (the first 10,000 objects in my case) and appending them together forever. The $objectList->count() will never equal 0 without passing each objectList() call the "marker" parameter.
@NordomWhistleklik I just woke up, knowing I committed an eternal loop. Fix coming up.
@NordomWhistleklik the fix was pushed a couple hours ago :)
Awesome! Thanks for doing all that! It's listing all my files now and the code looks a lot cleaner than mine did :)
@NordomWhistleklik thank you :) I'll tag a release so you don't have to rely on dev-master.
1.0.1
has been tagged
The Rackspace $container->objetList() call only returns 10,000 results max. In order to get around this, you need to make multiple calls, passing in the last object received as a marker.