You are here

public function DeployEndpoint::deploy in Deploy - Content Staging 7.2

Same name and namespace in other branches
  1. 7.3 includes/DeployEndpoint.inc \DeployEndpoint::deploy()

Deploys all entities over to the endpoint.

Parameters

string $lock_name: The name of the lock that this deployment is working under.

interger $deployment_key: The unique deployment key for this deployment.

Traversable $iterator: Usually this will be an object from a subclass of DeployAggregatorBase.

string $lock_name: Optional name of the lock that this deployment is working under.

File

includes/DeployEndpoint.inc, line 91
Base class for Deploy endpoint definitions.

Class

DeployEndpoint
Class representing a deployment endpoint.

Code

public function deploy($deployment_key, Traversable $iterator, $lock_name = NULL) {
  try {
    if (empty($this->authenticator)) {
      $this
        ->load();
    }
    $this->authenticator
      ->deploy($iterator);
    deploy_log($deployment_key, DEPLOY_STATUS_DEPLOYED);
  } catch (Exception $e) {
    if (!empty($lock_name)) {
      lock_release($lock_name);
    }
    deploy_log($deployment_key, DEPLOY_STATUS_FAILED, $e);
    throw $e;
  }
}