This commit is contained in:
Kenneth Kehl
2025-10-03 09:22:55 -07:00
parent 8dfa28c320
commit 8b6999f375
2 changed files with 4 additions and 4 deletions

View File

@@ -122,7 +122,7 @@ def get_zendesk_client():
if os.environ.get("NOTIFY_ENVIRONMENT") == "test":
return None
if zendesk_client is None:
raise RuntimeError(f"Celery not initialized zendesk_client: {zendesk_client}")
zendesk_client = ZendeskClient()
return zendesk_client
@@ -148,6 +148,7 @@ def get_document_download_client():
def create_app(application):
global zendesk_client, migrate, document_download_client, aws_ses_client, aws_ses_stub_client
from app.config import configs
notify_environment = os.environ["NOTIFY_ENVIRONMENT"]
@@ -170,7 +171,8 @@ def create_app(application):
# start lazy initialization for gevent
migrate = Migrate()
migrate.init_app(application, db=db)
zendesk_client = ZendeskClient()
if zendesk_client is None:
zendesk_client = ZendeskClient()
zendesk_client.init_app(application)
document_download_client = DocumentDownloadClient()
document_download_client.init_app(application)

View File

@@ -49,7 +49,6 @@ register_errors(job_blueprint)
@job_blueprint.route("/<job_id>", methods=["GET"])
def get_job_by_service_and_job_id(service_id, job_id):
current_app.logger.info(hilite("ENTER get_job_by_service_and_job_id"))
check_suspicious_id(service_id, job_id)
job = dao_get_job_by_service_id_and_job_id(service_id, job_id)
statistics = dao_get_notification_outcomes_for_job(service_id, job_id)
@@ -150,7 +149,6 @@ def get_all_notifications_for_service_job(service_id, job_id):
notifications = notification_with_template_schema.dump(
paginated_notifications.items, many=True
)
current_app.logger.info(hilite("Got the dumped notifications and returning"))
return (
jsonify(