cancelJob() public method

public cancelJob ( array $args = [] ) : array
$args array
return array
Example #1
0
 /**
  * Requests that a job be cancelled. You will need to poll the job to ensure
  * the cancel request successfully goes through.
  *
  * Example:
  * ```
  * $job->cancel();
  *
  * $isComplete = $job->isComplete();
  *
  * while (!$isComplete) {
  *     sleep(1); // let's wait for a moment...
  *     $job->reload();
  *     $isComplete = $job->isComplete();
  * }
  *
  * echo 'Job successfully cancelled.';
  * ```
  *
  * @see https://cloud.google.com/bigquery/docs/reference/v2/jobs/cancel Jobs cancel API documentation.
  *
  * @param array $options [optional] Configuration options.
  */
 public function cancel(array $options = [])
 {
     $this->connection->cancelJob($options + $this->identity);
 }