We use the ContentRepositoryQueueIndexer to index a huge amount of nodes to Elasticearch. The package works that way, that it creates indexer-jobs that index batches of nodes and then one index-switch-job to switch the index to the new one.
If we have an error in the indexing configuration somewhere, the batches fail and in the worst case, the switching job switches to an empty index.
Thats why I want to implement a safeguard, so that the switch job checks for failed jobs in the queue and decides on that if it should witch or not:
To make this work, I need a method to
countFailed to count failed jobs, like we have a
count()for ready jobs. This method need to go to the QueueInterface and needs to be implemented by the queue implementations.
When on it, I would also add a countReserved().
What do you think about adding the methods?