Remove entities with DestroyWorkerResults
https://redmine.teklia.com/issues/4676
When a worker result deletion runs on a whole corpus, it should remove any Entity
from that corpus, optionally matching the worker_run_id
, worker_version_id
, configuration_id
or model_version_id
that were specified, as long as that entity is not used in any TranscriptionEntity
or MetaData
.
When it runs on a parent element, no entity should be deleted at all, as trying to look for entities related to an element or any of its descendants, and that are not used by any other element, is too costly performance-wise.