From 3cd150a6e6648b27b51e6369b751cdf9c4c8c290 Mon Sep 17 00:00:00 2001 From: Ori Date: Fri, 26 Feb 2021 08:00:43 +0200 Subject: [PATCH 1/2] fix: fixed bug in internal/event which caused a crash on startup --- app/internal/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/internal/event.py b/app/internal/event.py index c8867499..7ce4fd2c 100644 --- a/app/internal/event.py +++ b/app/internal/event.py @@ -142,7 +142,7 @@ def add_countries_to_db(session: Session) -> None: session.commit() -@functools.lru_cache +@functools.lru_cache() def get_all_countries_names(session: Session) -> List[str]: """ Returns a cached list of the countries names. From 7c1a84718bcdcdcd1d13ace3abda33cff21c8b5c Mon Sep 17 00:00:00 2001 From: Ori Date: Fri, 26 Feb 2021 16:46:24 +0200 Subject: [PATCH 2/2] Update: update according to request to include maxsize --- app/internal/event.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/internal/event.py b/app/internal/event.py index 7ce4fd2c..3d4bebfe 100644 --- a/app/internal/event.py +++ b/app/internal/event.py @@ -142,7 +142,7 @@ def add_countries_to_db(session: Session) -> None: session.commit() -@functools.lru_cache() +@functools.lru_cache(maxsize=None) def get_all_countries_names(session: Session) -> List[str]: """ Returns a cached list of the countries names.