You are here

function deploy_queue_worker_deploy in Deploy - Content Staging 7.2

Same name and namespace in other branches
  1. 7.3 deploy.module \deploy_queue_worker_deploy()

Processes a single queued item for deployment.

2 string references to 'deploy_queue_worker_deploy'
DeployProcessorBatch::deploy in plugins/DeployProcessorBatch.inc
Main processing method that should hand over the aggregator to the endpoint to deploy all the entities.
deploy_cron_queue_info in ./deploy.module
Implements hook_cron_queue_info().

File

./deploy.module, line 354
Deploy module functions.

Code

function deploy_queue_worker_deploy($entity, &$context = NULL) {
  $endpoint = deploy_endpoint_load($entity->__metadata['endpoint_name']);
  $plan = deploy_plan_load($entity->__metadata['plan_name']);
  if ($plan && $endpoint) {
    $entities = array(
      array(
        'type' => $entity->__metadata['type'],
        'id' => $entity->__metadata['id'],
      ),
    );
    $iterator = deploy_iterator($entities, $plan);
    $endpoint
      ->deploy($entity->__metadata['deployment_key'], $iterator, $entity->__metadata['lock_name']);
  }
}