chore: use API logger in migration file

This commit is contained in:
Chandrapal Badshah
2025-10-20 19:01:15 +05:30
parent 28ce5c9b39
commit c64c86d8a3
@@ -1,9 +1,11 @@
# Generated by Django 5.1.12 on 2025-10-09 07:50
import json
import logging
import uuid
import django.db.models.deletion
from config.custom_logging import BackendLogger
from cryptography.fernet import Fernet
from django.conf import settings
from django.db import migrations, models
@@ -12,6 +14,8 @@ import api.rls
from api.db_router import MainRouter
from api.db_utils import rls_transaction
logger = logging.getLogger(BackendLogger.API)
def migrate_lighthouse_configs_forward(apps, schema_editor):
"""
@@ -79,10 +83,9 @@ def migrate_lighthouse_configs_forward(apps, schema_editor):
default_parameters={},
)
except Exception as e:
print(
f"Failed to migrate lighthouse config for tenant {tenant_id}: {e}",
exc_info=True,
except Exception:
logger.exception(
"Failed to migrate lighthouse config for tenant %s", tenant_id
)
continue