diff --git a/monitoring/mock_uss/__init__.py b/monitoring/mock_uss/__init__.py index 4aa3c4ab35..c48c01b3b4 100644 --- a/monitoring/mock_uss/__init__.py +++ b/monitoring/mock_uss/__init__.py @@ -1,6 +1,13 @@ import inspect import os from typing import Any, Optional, Callable + +# Because mock_uss uses gevent, we need to monkey-patch before anything else is loaded. +# https://www.gevent.org/intro.html#monkey-patching +from gevent import monkey + +monkey.patch_all() + from loguru import logger from monitoring.mock_uss.server import MockUSS