mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 13:01:56 +00:00
chore: use API logger in migration file
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user