Currently there is no way to know when a certain batch has completed, as the complete() method is only called after the whole queue for a background process is complete. However, in certain scenarios, it's desirable to know when a certain batch of related items has completed, such as when running imports or exports on background.
It would be great if instead of simply calling $this->delete( $batch->key ) when a batch is complete, it would also call something like $this->batch_complete( $batch ).
Currently there is no way to know when a certain batch has completed, as the
complete()method is only called after the whole queue for a background process is complete. However, in certain scenarios, it's desirable to know when a certain batch of related items has completed, such as when running imports or exports on background.It would be great if instead of simply calling
$this->delete( $batch->key )when a batch is complete, it would also call something like$this->batch_complete( $batch ).