Closed Mesteery closed 3 years ago
Even if it is very unlikely, add a max retry limit would be great.
Why not, but what should be returned to the user? This is an unlikely case, he will inevitably end up finding a free identifier.
I really don't like the idea of having a possible infinite loop. I suppose a Internal Server Error
could be sufficient.
Maybe, we need more reviewers to express their thoughts on that
+1 for a watchdog
for watchdog in range(20):
indent = ...
if not database.exists(ident):
break
else:
raise RuntimeError("Woof")```
Closes: #64.
A bin can currently overwrite another one, if it has the same identifier. This will prevent overwriting, by generating an ID until it is not already taken.