brightcove.drush.inc in Brightcove Video Connect 8.2
Same filename and directory in other branches
Contains custom Brightcove drush commands.
File
brightcove.drush.incView source
<?php
/**
* @file
* Contains custom Brightcove drush commands.
*/
use Drupal\brightcove\BrightcoveUtil;
/**
* Implements hook_drush_command().
*/
function brightcove_drush_command() {
$items = [];
$items['brightcove-sync-all'] = [
'description' => 'Initiates a Brightcove-to-Drupal sync by adding API clients to the queue.',
'drupal dependencies' => [
'brightcove',
],
'callback' => 'drush_brightcove_sync_all',
'aliases' => [
'brightcove:sync-all',
'bcsa',
],
];
return $items;
}
/**
* Implements drush_hook_COMMAND().
*/
function drush_brightcove_sync_all() {
drush_print('Initiating Brightcove-to-Drupal sync...');
BrightcoveUtil::runStatusQueues('sync', \Drupal::service('queue'));
drush_backend_batch_process();
drush_print('Sync complete.');
}
Functions
Name | Description |
---|---|
brightcove_drush_command | Implements hook_drush_command(). |
drush_brightcove_sync_all | Implements drush_hook_COMMAND(). |