Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(escalating-issues): Auto-transition tasks should update up to 500_000 groups per minute #56168

Merged
4 changes: 2 additions & 2 deletions src/sentry/conf/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1131,8 +1131,8 @@ def SOCIAL_AUTH_DEFAULT_USERNAME() -> str:
},
"schedule_auto_transition_to_ongoing": {
"task": "sentry.tasks.schedule_auto_transition_to_ongoing",
# Run job every 10 minutes
"schedule": crontab(minute="*/10"),
# Run job every minute
"schedule": crontab(minute="*/1"),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing to run every minute.

"options": {"expires": 3600},
},
"github_comment_reactions": {
Expand Down
6 changes: 3 additions & 3 deletions src/sentry/issues/ongoing.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
def bulk_transition_group_to_ongoing(
from_status: int,
from_substatus: int,
groups: List[Group],
group_ids: List[int],
activity_data: Optional[Mapping[str, Any]] = None,
) -> None:
# make sure we don't update the Group when its already updated by conditionally updating the Group
groups_to_transistion = Group.objects.filter(
id__in=[group.id for group in groups], status=from_status, substatus=from_substatus
id__in=group_ids, status=from_status, substatus=from_substatus
)

Group.objects.update_group_status(
Expand All @@ -31,7 +31,7 @@ def bulk_transition_group_to_ongoing(
group.status = GroupStatus.UNRESOLVED
group.substatus = GroupSubStatus.ONGOING

bulk_remove_groups_from_inbox(groups)
bulk_remove_groups_from_inbox(groups_to_transistion)

for group in groups_to_transistion:
post_save.send_robust(
Expand Down
2 changes: 1 addition & 1 deletion src/sentry/issues/update_inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def update_inbox(
bulk_transition_group_to_ongoing(
group.status,
group.substatus,
[group],
[group.id],
activity_data={"manually": True},
)

Expand Down
Loading
Loading