You are here

function video_run_queue in Video 6.5

3 calls to video_run_queue()
drush_video_scheduler in ./video.drush.inc
video_cron in ./video.module
Implementation of hook_cron().
video_scheduler.php in ./video_scheduler.php
Implement video rendering scheduling. If you are not using sites/default/settings.php as your settings file, add an optional parameter for the drupal site url: "php video_scheduler.php http://example.com/" or "php video_scheduler.php…

File

./video.module, line 717
Main file of the Video module.

Code

function video_run_queue($num = NULL) {
  if ($num === NULL || $num <= 0) {
    $num = intval(variable_get('video_queue_batchsize', 5));
  }
  $donesomething = FALSE;
  $transcoder = video_get_transcoder();
  $filesystem = video_get_filesystem();
  $presets = video_get_presets();
  $videos = $transcoder
    ->load_job_queue($num);
  foreach ($videos as $video) {
    if (_video_process_video($video, $transcoder, $filesystem, $presets)) {
      $donesomething = TRUE;
    }
  }

  // Clear cache once completed the conversion to update the file paths
  if ($donesomething) {
    cache_clear_all('*', 'cache_content', TRUE);
  }
}