public function Rest::process in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php \Drupal\salesforce_push\Plugin\SalesforcePushQueueProcessor\Rest::process()
- 5.0.x modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php \Drupal\salesforce_push\Plugin\SalesforcePushQueueProcessor\Rest::process()
Process push queue items.
Overrides PushQueueProcessorInterface::process
File
- modules/
salesforce_push/ src/ Plugin/ SalesforcePushQueueProcessor/ Rest.php, line 118
Class
- Rest
- Rest queue processor plugin.
Namespace
Drupal\salesforce_push\Plugin\SalesforcePushQueueProcessorCode
public function process(array $items) {
if (!$this->client
->isAuthorized()) {
throw new SuspendQueueException('Salesforce client not authorized.');
}
foreach ($items as $item) {
try {
$this
->processItem($item);
$this->queue
->deleteItem($item);
} catch (\Exception $e) {
$this->queue
->failItem($e, $item);
}
}
}