Skip to content

Commit 0f9a648

Browse files
yuvmenclaude
andcommitted
ref(seer): Use UNRESOLVED_SUBSTATUS_CHOICES constant
Replace hardcoded substatus list with the canonical UNRESOLVED_SUBSTATUS_CHOICES constant from sentry.types.group. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4fdfd88 commit 0f9a648

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/sentry/tasks/seer/backfill_supergroups_lightweight.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from sentry.snuba.dataset import Dataset
1919
from sentry.tasks.base import instrumented_task
2020
from sentry.taskworker.namespaces import seer_tasks
21-
from sentry.types.group import GroupSubStatus
21+
from sentry.types.group import UNRESOLVED_SUBSTATUS_CHOICES
2222
from sentry.utils import metrics
2323
from sentry.utils.snuba import bulk_snuba_queries
2424

@@ -78,12 +78,7 @@ def backfill_supergroups_lightweight_for_org(
7878
project_id__in=project_ids,
7979
type=DEFAULT_TYPE_ID,
8080
last_seen__gte=cutoff,
81-
substatus__in=[
82-
GroupSubStatus.ONGOING,
83-
GroupSubStatus.NEW,
84-
GroupSubStatus.ESCALATING,
85-
GroupSubStatus.REGRESSED,
86-
],
81+
substatus__in=UNRESOLVED_SUBSTATUS_CHOICES,
8782
)
8883

8984
if last_group_id > 0:

0 commit comments

Comments
 (0)