Skip to content

Commit

Permalink
Suppress runtime warnings (#3354)
Browse files Browse the repository at this point in the history
  • Loading branch information
picklelo authored May 21, 2024
1 parent ec72448 commit ff985ae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reflex/utils/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import asyncio
import multiprocessing
import platform
import warnings

try:
from datetime import UTC, datetime
Expand Down Expand Up @@ -192,6 +193,7 @@ async def async_send(event, telemetry_enabled, **kwargs):
asyncio.create_task(async_send(event, telemetry_enabled, **kwargs))
except RuntimeError:
# If there is no event loop, send the event synchronously.
warnings.filterwarnings("ignore", category=RuntimeWarning)
_send(event, telemetry_enabled, **kwargs)


Expand Down

0 comments on commit ff985ae

Please sign in to comment.