Problem/Motivation
There is currently no way to run a forking, progressive batch process in Drupal's official CLI. This is a useful function because it helps curb OOM with long-running tasks. Current recommendation is to use batch_process() with progressive set to FALSE, which runs the entire batch process in the same thread, and does not offer the same OOM safety provided by the Drush 13 drush_backend_batch_process() API.
Steps to reproduce
Proposed resolution
Implement an analog to drush_backend_batch_process() in Drupal core that supports forking, progressive batching to avoid OOM issues. It should ideally have a progress indicator similar to the web UI for batch processes.
Comments
Comment #2
clayfreemanSee UpdatedbCommand.php for an example of the current approach.
Comment #3
moshe weitzman commented