Localize notification_utils to the API

This changeset pulls in all of the notification_utils code directly into the API and removes it as an external dependency.  We are doing this to cut down on operational maintenance of the project and will begin removing parts of it no longer needed for the API.

Signed-off-by: Carlo Costino <carlo.costino@gsa.gov>
This commit is contained in:
Carlo Costino
2024-05-16 10:17:45 -04:00
parent 4cdf8b2cb2
commit 99edc88197
129 changed files with 49913 additions and 263 deletions

View File

@@ -4,16 +4,16 @@ from threading import RLock
import cachetools
from flask import current_app
from notifications_utils.clients.redis import RequestCache
from notifications_utils.serialised_model import (
SerialisedModel,
SerialisedModelCollection,
)
from werkzeug.utils import cached_property
from app import db, redis_store
from app.dao.api_key_dao import get_model_api_keys
from app.dao.services_dao import dao_fetch_service_by_id
from notifications_utils.clients.redis import RequestCache
from notifications_utils.serialised_model import (
SerialisedModel,
SerialisedModelCollection,
)
caches = defaultdict(partial(cachetools.TTLCache, maxsize=1024, ttl=2))
locks = defaultdict(RLock)