LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
Handled Programming error while creating log_consumer_scheduler while migration (#350)
alia9461919ea32
diff --git a/backend/workflow_manager/workflow/execution_log_utils.py b/backend/workflow_manager/workflow/execution_log_utils.pyindex 6c2b7bb14..f726bcf4b 100644--- a/backend/workflow_manager/workflow/execution_log_utils.py+++ b/backend/workflow_manager/workflow/execution_log_utils.py@@ -1,9 +1,11 @@import logging+import sysfrom collections import defaultdictfrom account.models import Organizationfrom celery import shared_taskfrom django.db import IntegrityError+from django.db.utils import ProgrammingErrorfrom django_celery_beat.models import IntervalSchedule, PeriodicTaskfrom django_tenants.utils import get_tenant_model, tenant_contextfrom utils.cache_service import CacheService@@ -48,6 +50,15 @@ def create_log_consumer_scheduler_if_not_exists():every=ExecutionLogConstants.CONSUMER_INTERVAL,period=IntervalSchedule.SECONDS,)+ except ProgrammingError as error:+ logger.warning(+ "ProgrammingError occurred while creating "+ "log consumer scheduler. If you are currently running "+ "migrations for new environment, you can ignore this warning"+ )+ if "migrate" not in sys.argv:+ logger.warning(f"ProgrammingError details: {error}")+ returnexcept IntervalSchedule.MultipleObjectsReturned as error:logger.error(f"Error occurred while getting interval schedule: {error}")interval = IntervalSchedule.objects.filter(