You are here

public function SalesforcePushCommands::pushQueue in Salesforce Suite 8.4

Same name and namespace in other branches
  1. 8.3 modules/salesforce_push/src/Commands/SalesforcePushCommands.php \Drupal\salesforce_push\Commands\SalesforcePushCommands::pushQueue()
  2. 5.0.x modules/salesforce_push/src/Commands/SalesforcePushCommands.php \Drupal\salesforce_push\Commands\SalesforcePushCommands::pushQueue()

Process push queues for one or all Salesforce Mappings.

@usage drush sfpushq Process all push queue items. @usage drush sfpushq foo Process push queue items for mapping "foo".

@command salesforce_push:push-queue @aliases sfpushq,sfpm,sf-push-queue,salesforce_push:queue

Parameters

string $name: Mapping name.

Throws

\Exception

File

modules/salesforce_push/src/Commands/SalesforcePushCommands.php, line 111

Class

SalesforcePushCommands
A Drush commandfile.

Namespace

Drupal\salesforce_push\Commands

Code

public function pushQueue($name) {
  $mappings = $this
    ->getPushMappingsFromName($name);
  foreach ($mappings as $mapping) {

    // Process one mapping queue.
    $this->pushQueue
      ->processQueue($mapping);
    $this
      ->logger()
      ->info(dt('Finished pushing !name', [
      '!name' => $mapping
        ->label(),
    ]));
  }
}