You are here

function video_cron in Video 7

Same name and namespace in other branches
  1. 6.5 video.module \video_cron()
  2. 6.4 video.module \video_cron()
  3. 7.2 video.module \video_cron()
1 string reference to 'video_cron'
video_cron_admin_settings in modules/video_ui/video.admin.inc
Video cron admin settings

File

./video.module, line 116

Code

function video_cron() {
  if (variable_get('video_cron', TRUE)) {
    module_load_include('inc', 'video', 'includes/conversion');
    $video_conversion = new video_conversion();
    if ($videos = $video_conversion
      ->load_job_queue()) {
      $queue = DrupalQueue::get('video_queue');
      foreach ($videos as $video) {
        if ($queue
          ->createItem($video)) {
          $video_conversion
            ->change_status($video->vid, VIDEO_RENDERING_INQUEUE);
        }
      }
    }
  }
}