flask-ipban
flask-ipban copied to clipboard
Questions when using the "persist" flag
~~When the persist flag is used, the internal read_updates() function will not load data.~~
EDIT: Sorry, in my program I was already managing seed(), this was the reason for the first issue I previously reported, which is now struck out. The other questions are anyway still valid.
There are ~~three~~ aspects that I do not understand:
- ~~this random instruction always returns the same value because no seed is used.~~
~~To ensure it gets different values on different sessions, you need to perform something like~~
import time random.seed(time.perf_counter()) - why, when loading values, you only process the ones with different sessions? I expected that saved values are loaded in all cases.
- accepting that you need to manage sessions the way they are implemented, how can you ensure to avoid that the same random value could sometimes occur between different sessions? In such a case, even if remote, saved values are not loaded.
Thanks for your questions. I'll have a look today. Feel free to create a pull request if you can work out from the code how to resolve your issue.