Skip to content

[IMP] export_bg: Enhance data export functionality with chunking and …#343

Closed
lef-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-108220-lef2
Closed

[IMP] export_bg: Enhance data export functionality with chunking and …#343
lef-adhoc wants to merge 1 commit intoingadhoc:18.0from
adhoc-dev:18.0-h-108220-lef2

Conversation

@lef-adhoc
Copy link
Copy Markdown
Contributor

…improved record handling

@roboadhoc
Copy link
Copy Markdown
Contributor

Pull request status dashboard

Comment thread export_bg/models/export_bg_mixin.py Outdated
Comment thread export_bg/models/export_bg_mixin.py Outdated
Comment thread export_bg/models/export_bg_mixin.py Outdated
Comment thread base_bg/models/base_bg.py Outdated
@lef-adhoc lef-adhoc force-pushed the 18.0-h-108220-lef2 branch 6 times, most recently from 5dc9236 to b8b5e52 Compare January 20, 2026 20:57
@joa-adhoc joa-adhoc requested a review from Copilot January 21, 2026 18:13
Comment thread export_bg/models/export_bg_mixin.py
Comment thread export_bg/models/export_bg_mixin.py
Comment thread export_bg/models/export_bg_mixin.py Outdated
Comment thread export_bg/models/export_bg_mixin.py Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Este PR mejora significativamente la funcionalidad de exportación en background mediante la implementación de procesamiento por lotes (chunking) y un sistema de encadenamiento de jobs. La mejora permite manejar exportaciones grandes dividiendo los datos en múltiples jobs que se ejecutan secuencialmente.

Changes:

  • Implementación de sistema de batching con campos batch_key y next_job_id para vincular jobs relacionados
  • Refactorización de la API de enqueue: bg_enqueue ahora delega a bg_enqueue_records que soporta división por threshold
  • Nueva lógica de exportación por chunks que genera attachments intermedios y los combina al final
  • Cancelación automática de jobs subsiguientes cuando un job del batch falla
  • Amplia cobertura de tests para las nuevas funcionalidades de batching

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
base_bg/models/base_bg.py Refactoriza bg_enqueue para soportar batching con thresholds, añade bg_enqueue_records y helper is_serializable
base_bg/models/bg_job.py Agrega campos batch_key, next_job_id y cancel_time; implementa encadenamiento de jobs y cancelación en cascada
export_bg/models/export_bg_mixin.py Reemplaza métodos monolíticos de export por sistema de chunks con _export_chunk_bg y _combine_chunks
export_bg/static/src/views/list_controller.js Simplifica llamada al backend usando nuevo método unificado web_export
base_bg/views/bg_job_views.xml Añade campos de batch, nuevo botón para ver jobs del batch, filtros adicionales y remueve readonly de campos
base_bg/tests/test_bg_job.py Añade 12 nuevos tests para batching, linking, cancelación y helpers; elimina 1 test de prioridad
base_bg/migrations/18.0.1.0.2/post-migration.py Script para popular batch_key en jobs existentes con UUIDs únicos
base_bg/demo/bg_job_demo.xml Actualiza datos demo para mostrar batches completos, fallidos y jobs individuales
base_bg/manifest.py Incrementa versión a 18.0.1.0.2

Comment thread base_bg/models/bg_job.py
Comment thread export_bg/models/export_bg_mixin.py
Comment thread base_bg/tests/test_bg_job.py
Comment thread base_bg/migrations/18.0.1.0.2/post-migration.py
Comment thread export_bg/models/export_bg_mixin.py
Comment thread export_bg/models/export_bg_mixin.py Outdated
Comment thread export_bg/models/export_bg_mixin.py
Comment thread export_bg/models/export_bg_mixin.py
Comment thread export_bg/models/export_bg_mixin.py Outdated
Comment thread base_bg/models/base_bg.py Outdated
@lef-adhoc lef-adhoc force-pushed the 18.0-h-108220-lef2 branch 5 times, most recently from edfa1cd to 9a1b0df Compare January 22, 2026 16:55
@joa-adhoc
Copy link
Copy Markdown
Contributor

@roboadhoc r+

roboadhoc pushed a commit that referenced this pull request Jan 22, 2026
…ectly when using a template

closes #343

Signed-off-by: Joaquín Arroyo (ADV) <joa@adhoc.inc>
@roboadhoc roboadhoc closed this Jan 22, 2026
@roboadhoc roboadhoc deleted the 18.0-h-108220-lef2 branch January 22, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants