Skip to content

Commit

Permalink
CeleryIntegration should make _wrap_apply_async unnecessary
Browse files Browse the repository at this point in the history
  • Loading branch information
suejung-sentry committed Nov 21, 2024
1 parent 3f13917 commit 9a67ab5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ dev-dependencies = [
"vcrpy",
]

[tool.uv.dependencies]
sentry-sdk = { version = "*", extras = ["celery"] }

[tool.uv.sources]
codecovopentelem = { git = "https://github.com/codecov/opentelem-python", rev = "df1e241927d4794fc0e24f96431f0fb730edac21" }
shared = { git = "https://github.com/codecov/shared", rev = "9c31870de026a8a3f026f0753b1991e8c832fadb" }
15 changes: 0 additions & 15 deletions services/task/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@
from datetime import datetime, timedelta
from typing import Iterable, List, Optional, Tuple

import celery
from celery import Celery, chain, group, signature
from celery.canvas import Signature
from django.conf import settings
from sentry_sdk import set_tag
from sentry_sdk.integrations.celery import _wrap_apply_async
from shared import celery_config

from core.models import Repository
Expand All @@ -19,17 +15,6 @@

log = logging.getLogger(__name__)

if settings.SENTRY_ENV:
celery.group.apply_async = _wrap_apply_async(celery.group.apply_async)
celery.chunks.apply_async = _wrap_apply_async(celery.chunks.apply_async)
celery.canvas._chain.apply_async = _wrap_apply_async(
celery.canvas._chain.apply_async
)
celery.canvas._chord.apply_async = _wrap_apply_async(
celery.canvas._chord.apply_async
)
Signature.apply_async = _wrap_apply_async(Signature.apply_async)


class TaskService(object):
def _create_signature(self, name, args=None, kwargs=None, immutable=False):
Expand Down

0 comments on commit 9a67ab5

Please sign in to comment.