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

Cleanup Can Be Stuck in Endless Loop #4

Open
belugabehr opened this issue Aug 19, 2020 · 0 comments
Open

Cleanup Can Be Stuck in Endless Loop #4

belugabehr opened this issue Aug 19, 2020 · 0 comments

Comments

@belugabehr
Copy link

belugabehr commented Aug 19, 2020

Here, the code runs as long as the list isn't empty. I had a weird scenario with a database setup where the SQL wasn't generating a DatabaseError, but it wasn't deleting the records either. Since the list was never getting smaller, the code was stuck in an endless loop.

I think it would be better to iterate through the list (instead of reloading the list for each loop) and then at the end print the number of items that still exist in the list.

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

No branches or pull requests

1 participant