Skip to content

Commit 0f245bb

Browse files
Yuri ZmytrakovYuri Zmytrakov
authored andcommitted
add redis
1 parent b87e9c0 commit 0f245bb

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

stac_fastapi/core/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"pygeofilter~=0.3.1",
2020
"jsonschema~=4.0.0",
2121
"slowapi~=0.1.9",
22+
"redis==6.4.0",
2223
]
2324

2425
setup(

stac_fastapi/core/stac_fastapi/core/core.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
add_previous_link,
2929
cache_current_url,
3030
cache_previous_url,
31-
connect_redis_sentinel,
3231
connect_redis,
32+
connect_redis_sentinel,
3333
)
3434
from stac_fastapi.core.serializers import CollectionSerializer, ItemSerializer
3535
from stac_fastapi.core.session import Session
@@ -265,9 +265,7 @@ async def all_collections(self, **kwargs) -> stac_types.Collections:
265265
},
266266
]
267267

268-
await add_previous_link(
269-
redis, links, "collections", current_url, token
270-
)
268+
await add_previous_link(redis, links, "collections", current_url, token)
271269
if redis:
272270
await cache_previous_url(redis, current_url, "collections")
273271

stac_fastapi/tests/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import pytest
88
import pytest_asyncio
9+
import redis # noqa: F401
910
from fastapi import Depends, HTTPException, security, status
1011
from httpx import ASGITransport, AsyncClient
1112
from pydantic import ConfigDict

0 commit comments

Comments
 (0)