lazy initialize zendesk_client

This commit is contained in:
Kenneth Kehl
2025-10-02 07:36:55 -07:00
parent 7d80326051
commit 65911044fd
3 changed files with 21 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ from flask import current_app
from sqlalchemy import between, select, union
from sqlalchemy.exc import SQLAlchemyError
from app import db, notify_celery, redis_store, zendesk_client
from app import db, get_zendesk_client, notify_celery, redis_store
from app.celery.tasks import (
get_recipient_csv_and_template_and_sender_id,
process_incomplete_jobs,
@@ -44,6 +44,8 @@ from notifications_utils.clients.zendesk.zendesk_client import NotifySupportTick
MAX_NOTIFICATION_FAILS = 10000
zendesk_client = get_zendesk_client()
@notify_celery.task(name="run-scheduled-jobs")
def run_scheduled_jobs():