Skip to content

Cleanup Can Be Stuck in Endless Loop #4

@belugabehr

Description

@belugabehr

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions