You are here

public function video_zencoder_api::cancel_job in Video 6.5

File

plugins/video_zencoder/video_zencoder.lib.inc, line 106
Class file to handle amazon s3 transfers.

Class

video_zencoder_api

Code

public function cancel_job(stdClass $video) {
  try {
    $this->zencoder->jobs
      ->cancel($video->jobid);
    return TRUE;
  } catch (Services_Zencoder_Exception $e) {
    watchdog('zencoder', 'Error while cancelling job @jobid for video %filepath: !errorlist, @errormsg', array(
      '@jobid' => $video->jobid,
      '%filepath' => $video->filepath,
      '@errormsg' => $e
        ->getMessage(),
      '!errorlist' => theme('item_list', $e
        ->getErrors()),
    ), WATCHDOG_ERROR);
    return FALSE;
  }
}