Browse Source

fix(crons): Remove unnecessary select_related (#57070)

Removes unnecessary `select_related` to improve efficiency
Richard Ortenberg 1 year ago
parent
commit
6b90aaa94f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/sentry/monitors/tasks.py

+ 1 - 1
src/sentry/monitors/tasks.py

@@ -239,7 +239,7 @@ def check_timeout(current_datetime: datetime):
 
     qs = MonitorCheckIn.objects.filter(
         status=CheckInStatus.IN_PROGRESS, timeout_at__lte=current_datetime
-    ).select_related("monitor", "monitor_environment")[:CHECKINS_LIMIT]
+    )[:CHECKINS_LIMIT]
     metrics.gauge("sentry.monitors.tasks.check_timeout.count", qs.count(), sample_rate=1)
     # check for any monitors which are still running and have exceeded their maximum runtime
     for checkin in qs: