Skip to content

Commit

Permalink
fix(hybrid-cloud): Override get_from_cache and get_many_from_cache wi…
Browse files Browse the repository at this point in the history
…th silo limits
  • Loading branch information
dashed committed Aug 16, 2023
1 parent d43f543 commit ad3bf32
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/sentry/db/models/manager/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,12 @@ def create_silo_limited_copy(self: BaseManager[M], limit: SiloLimit) -> BaseMana
"select_for_update": limit.create_override(cls.select_for_update),
"update": limit.create_override(cls.update),
"update_or_create": limit.create_override(cls.update_or_create),
"get_from_cache": limit.create_override(cls.get_from_cache)
if hasattr(cls, "get_from_cache")
else None,
"get_many_from_cache": limit.create_override(cls.get_many_from_cache)
if hasattr(cls, "get_many_from_cache")
else None,
}
manager_subclass = type(cls.__name__, (cls,), overrides)
manager_instance = manager_subclass()
Expand Down

0 comments on commit ad3bf32

Please sign in to comment.