public function BrightcoveCommands::syncAll in Brightcove Video Connect 8.2
Same name and namespace in other branches
- 8 src/Commands/BrightcoveCommands.php \Drupal\brightcove\Commands\BrightcoveCommands::syncAll()
- 3.x src/Commands/BrightcoveCommands.php \Drupal\brightcove\Commands\BrightcoveCommands::syncAll()
Initiates a Brightcove-to-Drupal sync by adding API clients to the queue.
@command brightcove:sync-all @aliases brightcove-sync-all,bcsa
File
- src/
Commands/ BrightcoveCommands.php, line 38
Class
- BrightcoveCommands
- Drush 9.x commands for Brightcove Video Connect.
Namespace
Drupal\brightcove\CommandsCode
public function syncAll() {
$this
->output()
->writeln('Initiating Brightcove-to-Drupal sync...');
try {
BrightcoveUtil::runStatusQueues('sync', $this->queueFactory);
drush_backend_batch_process();
$this
->logger()
->notice('Sync complete.');
} catch (BrightcoveUtilException $e) {
$this
->logger()
->error($e
->getMessage());
watchdog_exception('brightcove', $e);
}
}