Implement redis clustering (#5189)

Co-authored-by: Jai Agrawal <geometrically@Jais-MacBook-Pro.local>
This commit is contained in:
Jai Agrawal
2026-01-23 13:51:17 +01:00
committed by GitHub
co-authored by Jai Agrawal
parent 5c29a8c7dd
commit fb1050e409
13 changed files with 200 additions and 124 deletions
@@ -256,15 +256,16 @@ impl DBOrganization {
) -> Result<(), super::DatabaseError> {
let mut redis = redis.connect().await?;
if let Some(slug) = slug {
redis
.delete(ORGANIZATIONS_TITLES_NAMESPACE, slug.to_lowercase())
.await?;
}
redis
.delete_many([
(ORGANIZATIONS_NAMESPACE, Some(id.0.to_string())),
(
ORGANIZATIONS_TITLES_NAMESPACE,
slug.map(|x| x.to_lowercase()),
),
])
.delete(ORGANIZATIONS_NAMESPACE, id.0.to_string())
.await?;
Ok(())
}
}