Skip to content

Commit c2d1ced

Browse files
committed
.
1 parent 2a12715 commit c2d1ced

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

sentry_sdk/integrations/celery/__init__.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
_patch_redbeat_apply_async,
1313
_setup_celery_beat_signals,
1414
)
15-
from sentry_sdk.integrations.celery.utils import _now_seconds_since_epoch
15+
from sentry_sdk.integrations.celery.utils import _now_seconds_since_epoch, NoOpMgr
1616
from sentry_sdk.integrations.logging import ignore_logger
1717
from sentry_sdk.traces import StreamedSpan
1818
from sentry_sdk.tracing import BAGGAGE_HEADER_NAME, Span, TransactionSource
@@ -244,14 +244,6 @@ def _update_celery_task_headers(
244244
return updated_headers
245245

246246

247-
class NoOpMgr:
248-
def __enter__(self) -> None:
249-
return None
250-
251-
def __exit__(self, exc_type: "Any", exc_value: "Any", traceback: "Any") -> None:
252-
return None
253-
254-
255247
def _wrap_task_run(f: "F") -> "F":
256248
@wraps(f)
257249
def apply_async(*args: "Any", **kwargs: "Any") -> "Any":

0 commit comments

Comments
 (0)