Fermer

queue

Drupal 9.4 Queue Worker avec traitement par lots

Drupal 9.4 Queue Worker avec traitement par lots

/** * {@inheritdoc} */ public function processItem($data) { // Implement your custom processing logic here. // This method will be called for each item in the queue. // Example: Updating an entity field value. $entity = $this->entityTypeManager->getStorage(‘node’)->load($data[‘nid’]); $entity->set(‘field_status’, ‘processed’); $entity->save(); // Batch processing. $batch = [ ‘operations’ => […]

Lire