feat: add redis cache
This commit is contained in:
+9
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user