Problem/Motivation
Now that the pre-delete event is firing for the deletion queue, and we are attempting to synchronize the deletion queue with the incoming items, it is much less useful, and probably just disruptive, to re-queue deletion queue items that have not found content to delete.
There are lot of use cases where items could be marked for deletion in Orange Logic where those items never were migrated to the destination (for example, a content type that is excluded from migration). Since the deletion API does not allow for filtering by only desired content types, it's entirely possible for the deletion queue to be filled with items that never migrated. Since those items are being re-queued on failure-to-delete, the queue (and logs!) fill up with unresolvable issues, even though there is no real error.
Proposed resolution
Don't throw an Exception from the queue worker if the item could not be deleted. Expect that the majority (or at least common case) is that deletion will fail to find an item to delete (for the aforementioned reasons).
We can skip re-queuing now because the module does a decent job at handling the potential race conditions between incoming items and to-be-deleted items via the pre-delete event.
Remaining tasks
Code the change.
User interface changes
No UI changes. But there are many ways to improve the log output.
API changes
none
Data model changes
none
Issue fork orange_dam-3422764
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
apotek commentedMerge request is up:
We still get this notification:
But the queue item is released from the queue….
So it will not be run again and again ...
Comment #4
apotek commentedComment #5
apotek commentedComment #6
apotek commented