Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

19530 - add in cache.init_app #2692

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions queue_services/account-mailer/src/account_mailer/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from auth_api.models import db
from auth_api.services import Flags
from auth_api.services.rest_service import RestService
from auth_api.utils.cache import cache
from auth_api.utils.roles import ADMIN, COORDINATOR
from entity_queue_common.service import QueueServiceManager
from entity_queue_common.service_utils import QueueException, logger
Expand All @@ -53,6 +54,7 @@
FLASK_APP = Flask(__name__)
FLASK_APP.config.from_object(APP_CONFIG)
db.init_app(FLASK_APP)
cache.init_app(FLASK_APP)
flag_service = Flags(FLASK_APP)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from auth_api.models import ActivityLog as ActivityLogModel
from auth_api.models import db
from auth_api.services import Flags
from auth_api.utils.cache import cache
from entity_queue_common.service import QueueServiceManager
from entity_queue_common.service_utils import QueueException, logger
from flask import Flask # pylint: disable=wrong-import-order
Expand All @@ -44,6 +45,7 @@
FLASK_APP = Flask(__name__)
FLASK_APP.config.from_object(APP_CONFIG)
db.init_app(FLASK_APP)
cache.init_app(FLASK_APP)
flag_service = Flags(FLASK_APP)


Expand Down
2 changes: 2 additions & 0 deletions queue_services/events-listener/src/events_listener/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
from auth_api.models import db
from auth_api.services import Flags
from auth_api.services.queue_publisher import publish
from auth_api.utils.cache import cache
from auth_api.utils.enums import OrgStatus
from entity_queue_common.service import QueueServiceManager
from entity_queue_common.service_utils import QueueException, logger
Expand All @@ -48,6 +49,7 @@
FLASK_APP = Flask(__name__)
FLASK_APP.config.from_object(APP_CONFIG)
db.init_app(FLASK_APP)
cache.init_app(FLASK_APP)
flag_service = Flags(FLASK_APP)

UNLOCK_ACCOUNT_MESSAGE_TYPE = 'bc.registry.payment.unlockAccount'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from auth_api.models import db
from auth_api.services import Flags
from auth_api.services.rest_service import RestService
from auth_api.utils.cache import cache
from auth_api.utils.enums import AccessType, ActivityAction, CorpType
from dateutil import parser
from entity_queue_common.service import QueueServiceManager
Expand Down Expand Up @@ -151,4 +152,5 @@ async def process_name_events(event_message: Dict[str, any]):
FLASK_APP = Flask(__name__)
FLASK_APP.config.from_object(APP_CONFIG)
db.init_app(FLASK_APP)
cache.init_app(FLASK_APP)
flag_service = Flags(FLASK_APP)
Loading