Content Hub adds items to the queue after saving or updating any entity, including changes to layout items such as views, blocks, or menus. Adding new fields, rearranging how fields display in entity_view_display
entities, or nearly any other action which could touch content or configuration entities will trigger Content Hub, which is a generally desired behavior.
Content Hub has the following mechanisms to control the content being exported:
- Preventing queueing: Queueing allows you to place items in a queue for processing later. However, Content Hub can prevent queueing, which is a simple process.
- Preventing entity syndication: Syndication allows you to leverage content created on one site to other sites in your fleet. This is a complex process.
Excluding entity types or bundles from the export queue
On the publisher website, you can select entity types or bundles that you want to exclude from the export queue. For example, the system excludes nodes for Basic pages. When creating or updating this type of node on the publisher, the system does not add it to the export queue automatically.
To exclude by entity type or bundle or both, navigate to Administration > Configuration > Web services > Acquia Content Hub. Click the Exclude from export queue tab, to use the provided multi-select fields:
Preventing queuing with custom code
To alter the default queuing behavior, use the following event:
\Drupal\acquia_contenthub_publisher\Event\ContentHubEntityEligibilityEvent
Event subscribers listening to the following endpoint provide examples of how to exclude certain kinds of data:
\Drupal\acquia_contenthub_publisher\AcquiaContentHubPublisherEvents::ENQUEUE_CANDIDATE_ENTITY
For an example of a class that prevents items from being enqueued, download the following file: enqueue-entity-eligibility.php
. This class prevents temporary files from entering the export queue.