Skip to content

Commit 7ae7f12

Browse files
committed
Merge branch 'srothh/async-transport-integration' into srothh/async-task-identifier
2 parents e170cf7 + 6dd8138 commit 7ae7f12

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

sentry_sdk/transport.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import ssl
88
import time
99
import asyncio
10-
1110
from datetime import datetime, timedelta, timezone
1211
from collections import defaultdict
1312
from urllib.request import getproxies
@@ -602,7 +601,6 @@ def __init__(self: Self, options: Dict[str, Any]) -> None:
602601
super().__init__(options)
603602
# Requires event loop at init time
604603
self.loop = asyncio.get_running_loop()
605-
self.background_tasks: set[asyncio.Task[None]] = set()
606604

607605
def _create_worker(self: Self, options: dict[str, Any]) -> Worker:
608606
return AsyncWorker(queue_size=options["transport_queue_size"])
@@ -800,9 +798,6 @@ def kill(self: Self) -> Optional[asyncio.Task[None]]: # type: ignore
800798

801799
logger.debug("Killing HTTP transport")
802800
self._worker.kill()
803-
for task in self.background_tasks:
804-
task.cancel()
805-
self.background_tasks.clear()
806801
try:
807802
# Return the pool cleanup task so caller can await it if needed
808803
with mark_sentry_task_internal():

tests/test_transport.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,7 @@ async def send_message(i):
880880

881881
tasks = [send_message(i) for i in range(num_messages)]
882882
await asyncio.gather(*tasks)
883-
transport = client.transport
884883
await client.close(timeout=2.0)
885-
assert len(transport.background_tasks) == 0
886884
assert len(capturing_server.captured) == num_messages
887885

888886

0 commit comments

Comments
 (0)