feat: add redis cache

This commit is contained in:
2024-08-22 08:45:30 +03:00
parent 0638fb8d50
commit d3ef03a6a0
19 changed files with 194 additions and 24 deletions
+9 -1
View File
@@ -6,8 +6,12 @@ import uvicorn
from gallery.easel import build_app
from gallery.painting.gismeteo.api import GismeteoApi
from gallery.painting.matchtv.api import MatchTvApi
from gallery.sketch.schedule.cached import CachedScheduleApi
from gallery.sketch.weather.cached import CachedWeatherApi
app = build_app(GismeteoApi(), MatchTvApi())
weather_api = CachedWeatherApi(GismeteoApi())
schedule_api = CachedScheduleApi(MatchTvApi())
app = build_app(weather_api, schedule_api)
def run():
@@ -18,3 +22,7 @@ def run():
log_config=str(Path(__file__).parent / "logging.yaml"),
reload="DEBUG" in environ,
)
if __name__ == "__main__":
run()