File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 7
7
import ssl
8
8
import time
9
9
import asyncio
10
+
10
11
from datetime import datetime , timedelta , timezone
11
12
from collections import defaultdict
12
13
from urllib .request import getproxies
Original file line number Diff line number Diff line change 3
3
import os
4
4
import threading
5
5
import asyncio
6
- import inspect
7
6
8
7
from time import sleep , time
9
8
from sentry_sdk ._queue import Queue , FullError
@@ -306,11 +305,7 @@ async def _target(self) -> None:
306
305
307
306
async def _process_callback (self , callback : Callable [[], Any ]) -> None :
308
307
# Callback is an async coroutine, need to await it
309
- if inspect .iscoroutinefunction (callback ):
310
- await callback ()
311
- else :
312
- # Callback is a sync function, such as _flush_client_reports()
313
- callback ()
308
+ await callback ()
314
309
315
310
def _on_task_complete (self , task : asyncio .Task [None ]) -> None :
316
311
try :
You can’t perform that action at this time.
0 commit comments