Skip to content

Commit 4fa42e2

Browse files
authored
Update some sentry_app queries to use the read replica (#93667)
This updates some of the queries to point to the control db replica. see #93081, breaking that change apart so we can better see the effects of these on the db.
1 parent bf1fcce commit 4fa42e2

File tree

1 file changed

+2
-2
lines changed
  • src/sentry/sentry_apps/services/app

1 file changed

+2
-2
lines changed

src/sentry/sentry_apps/services/app/impl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ def get_many(
6161
def find_app_components(self, *, app_id: int) -> list[RpcSentryAppComponent]:
6262
return [
6363
serialize_sentry_app_component(c)
64-
for c in SentryAppComponent.objects.filter(sentry_app_id=app_id)
64+
for c in SentryAppComponent.objects.using_replica().filter(sentry_app_id=app_id)
6565
]
6666

6767
def get_sentry_app_by_id(self, *, id: int) -> RpcSentryApp | None:
6868
try:
69-
sentry_app = SentryApp.objects.get(id=id)
69+
sentry_app = SentryApp.objects.using_replica().get(id=id)
7070
except SentryApp.DoesNotExist:
7171
return None
7272
return serialize_sentry_app(sentry_app)

0 commit comments

Comments
 (0)