Skip to content

add bulk actions to log page#190

Open
matiasqueroceballos wants to merge 4 commits into
trunkfrom
add-multideleted-log
Open

add bulk actions to log page#190
matiasqueroceballos wants to merge 4 commits into
trunkfrom
add-multideleted-log

Conversation

@matiasqueroceballos
Copy link
Copy Markdown
Contributor

Description:

Summary

  • Convert bulk resend from synchronous HTTP requests to asynchronous Action Scheduler jobs
  • Eliminates 30+ second blocking delay; AJAX now returns instantly
  • Each log resend is staggered by 1 second to prevent simultaneous CRM API calls
  • Frontend displays simulated progress for 4 seconds while backend processes in background
  • User is no longer blocked on error log page during bulk operations

Changes

  • class-error-log.php: ajax_bulk_resend_logs() now enqueues jobs instead of processing sequentially
  • error-log.js: Updated to handle instant response and show 4-second completion message before reload
  • Removes 20 sequential CRM API calls from request handler; offloads to background queue

Benefits

  • Dramatically faster user experience (instant feedback vs 34 seconds)
  • Better resource utilization (background processing)
  • Prevents timeout errors on large bulk operations
  • Uses existing retry_failed_entry() hook infrastructure

Testing

  • Select 20 logs and trigger bulk resend
  • AJAX completes in <100ms
  • Progress bar displays for 4 seconds
  • Page reloads with updated entries
  • Verify Action Scheduler shows queued jobs in admin UI

@matiasqueroceballos matiasqueroceballos self-assigned this May 8, 2026
@matiasqueroceballos matiasqueroceballos changed the title add bulk actions add bulk actions to log page May 8, 2026
@matiasqueroceballos
Copy link
Copy Markdown
Contributor Author

@davidperezgar esto es un añadido interesante, de parte de Alicia. Quieren poder borrar sólo algunos registros del log así que se han añadido buls action para poder hacerlo fácilmente por ellos desde la tabla de log

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.

1 participant