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

Revert "fix: Erroneous apply_async call (#29032)" #29038

Merged
merged 1 commit into from
Oct 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sentry/tasks/low_priority_symbolication.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _scan_for_suspect_projects() -> None:

for project_id in realtime_metrics.projects():
suspect_projects.add(project_id)
update_lpq_eligibility.apply_async(project_id=project_id)
update_lpq_eligibility(project_id).apply_async()

# Prune projects we definitely know shouldn't be in the queue any more.
# `update_lpq_eligibility` should handle removing suspect projects from the list if it turns
Expand Down
16 changes: 9 additions & 7 deletions tests/sentry/tasks/test_low_priority_symbolication.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from sentry.processing import realtime_metrics
from sentry.tasks.low_priority_symbolication import calculation_magic, scan_for_suspect_projects
import pytest

from sentry.tasks.low_priority_symbolication import calculation_magic
from sentry.utils import redis

def test_calculation_magic():
assert not calculation_magic([], [])

@pytest.fixture
def redis_cluster() -> redis._RedisCluster:
return redis.redis_clusters.get("default")


def test_scan_for_suspect_projects() -> None:
realtime_metrics.increment_project_event_counter(17, 0)
scan_for_suspect_projects()
def test_calculation_magic():
assert not calculation_magic([], [])