Skip to content

Commit

Permalink
fix: Erroneous apply_async call (#29032)
Browse files Browse the repository at this point in the history
  • Loading branch information
loewenheim authored Oct 4, 2021
1 parent 84c739c commit 7b07c67
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
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(project_id).apply_async()
update_lpq_eligibility.apply_async(project_id=project_id)

# 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: 7 additions & 9 deletions tests/sentry/tasks/test_low_priority_symbolication.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import pytest

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


@pytest.fixture
def redis_cluster() -> redis._RedisCluster:
return redis.redis_clusters.get("default")
from sentry.processing import realtime_metrics
from sentry.tasks.low_priority_symbolication import calculation_magic, scan_for_suspect_projects


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


def test_scan_for_suspect_projects() -> None:
realtime_metrics.increment_project_event_counter(17, 0)
scan_for_suspect_projects()

0 comments on commit 7b07c67

Please sign in to comment.