Previously the task_process_document_queues processed all the pending queue items it could find, this could lead to the of inexisting queue items from a stale queryset