Originally created by @itaybar on GitHub (Sep 21, 2024).
Originally assigned to: @tjbck on GitHub.
since redis socket io manager just added, I think it would be great to move the stats pools to be managed in redis as well, this way this statistics will be aggregated along all openweb ui instaces (for k8s envs)
and the rest of the code is the same since RedisDict can be accessed like a regular dict
Originally created by @itaybar on GitHub (Sep 21, 2024).
Originally assigned to: @tjbck on GitHub.
since redis socket io manager just added, I think it would be great to move the stats pools to be managed in redis as well, this way this statistics will be aggregated along all openweb ui instaces (for k8s envs)
I recommend to use redis-dict 2.5.0 https://pypi.org/project/redis-dict/ since this will be 2 line of code addition for what there is now
```
if WEBSOCKET_MANAGER == "redis":
USER_POOL = RedisDict(host=, port=, namespace="openweb-ui:user-pool)
else:
USER_POOL = {}
```
and the rest of the code is the same since RedisDict can be accessed like a regular dict
and there is also option to add ttl for the data, since in local dict when you restart the application the data will be deleted as well and when it be in the redis it will not be deleted, and there is need to prevent data duplication
@itaybar commented on GitHub (Sep 21, 2024):
and there is also option to add ttl for the data, since in local dict when you restart the application the data will be deleted as well and when it be in the redis it will not be deleted, and there is need to prevent data duplication
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @itaybar on GitHub (Sep 21, 2024).
Originally assigned to: @tjbck on GitHub.
since redis socket io manager just added, I think it would be great to move the stats pools to be managed in redis as well, this way this statistics will be aggregated along all openweb ui instaces (for k8s envs)
I recommend to use redis-dict 2.5.0 https://pypi.org/project/redis-dict/ since this will be 2 line of code addition for what there is now
and the rest of the code is the same since RedisDict can be accessed like a regular dict
@itaybar commented on GitHub (Sep 21, 2024):
and there is also option to add ttl for the data, since in local dict when you restart the application the data will be deleted as well and when it be in the redis it will not be deleted, and there is need to prevent data duplication
@tjbck commented on GitHub (Sep 22, 2024):
Added to dev, testing wanted here!