Both hook_entity_insert() and hook_entity_update() call tmgmt_content_create_continuous_job_items(). This is a potentially expensive call.
ContentEntitySource->getItemTypes() seems to indicate that any entity type with entity_revision_parent_type_field set would not be an eligible source (e.g. Paragraphs). However, there is nothing in the entity insert/update hooks to prevent creating continuous job items for those entities.
It seems like the hooks should respect allow content source entities and not attempt to create continous job items for them.
Will attach patch. My thinking/approach may be naive, so I'd appreciate feedback.
Comment | File | Size | Author |
---|---|---|---|
#2 | tmgmt-entity_hooks_respect_entity_revision_parent_type_field-2863486-2.patch | 1.27 KB | timcosgrove |
Comments
Comment #2
timcosgrove CreditAttribution: timcosgrove commentedPatch attached. This just checks the entity type for entity_revision_parent_type_field and passes if it's found. This approach may be naive.
Comment #3
BerdirDon't forget to set issues to needs review when uploading a patch.
Comment #5
timcosgrove CreditAttribution: timcosgrove commentedMoving this back to needs review, as the tests pass now.
Again, the motivation here is to not call
tmgmt_content_create_continuous_job_items()
on entities that are not eligible for translation.Comment #7
BerdirMakes sense, committed.