Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dojo/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def _trigger_async_index_update(self, model_groups):
# Import here to avoid circular import
from django.conf import settings # noqa: PLC0415 circular import

from dojo.celery_dispatch import dojo_dispatch_task # noqa: PLC0415 circular import
from dojo.tasks import update_watson_search_index_for_model # noqa: PLC0415 circular import

# Create tasks per model type, chunking large lists into configurable batches
Expand All @@ -337,4 +338,4 @@ def _trigger_async_index_update(self, model_groups):
# Create tasks for each batch and log each one
for i, batch in enumerate(batches, 1):
logger.debug(f"AsyncSearchContextMiddleware: Triggering batch {i}/{len(batches)} for {model_name}: {len(batch)} instances")
update_watson_search_index_for_model(model_name, batch)
dojo_dispatch_task(update_watson_search_index_for_model, model_name, batch)
Loading