diff --git a/irrd/__init__.py b/irrd/__init__.py index 88007ece9..fad186567 100644 --- a/irrd/__init__.py +++ b/irrd/__init__.py @@ -1,4 +1,4 @@ # Note that version is also in pyproject.toml -__version__ = "4.4-dev" +__version__ = "4.4.0b1" ENV_MAIN_PROCESS_PID = "IRRD_MAIN_PROCESS_PID" META_KEY_HTTP_CLIENT_IP = "HTTP-Client-IP" diff --git a/irrd/server/http/app.py b/irrd/server/http/app.py index 8cbc9ed71..25c5a01f6 100644 --- a/irrd/server/http/app.py +++ b/irrd/server/http/app.py @@ -66,8 +66,13 @@ async def startup(): try: app.state.database_handler = DatabaseHandler(readonly=True) app.state.preloader = Preloader(enable_queries=True) + async_redis_prefix = "" + if get_setting("redis_url").startswith("redis://"): + async_redis_prefix = "async+" + elif get_setting("redis_url").startswith("unix://"): + async_redis_prefix = "async+redis+" app.state.rate_limiter_storage = limits.storage.storage_from_string( - "async+" + get_setting("redis_url"), + async_redis_prefix + get_setting("redis_url"), protocol_version=2, ) app.state.rate_limiter = limits.aio.strategies.MovingWindowRateLimiter(app.state.rate_limiter_storage) diff --git a/pyproject.toml b/pyproject.toml index 8f9f4af12..2ac1bd05b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ name = "irrd" [tool.poetry] name = "irrd" # Note that version is also in irrd/__init__.py -version = "4.4-dev" +version = "4.4.0b1" description = "Internet Routing Registry daemon (IRRd)" authors = ["Reliably Coded for NTT Ltd. and others "] license = "BSD"