/**
  * Clear out the image manipulation cache
  * @param SS_HTTPRequest $request
  */
 public function run($request)
 {
     $failedFiles = 0;
     $Videos = VideoFile::get()->filter(array('ProcessingStatus' => 'error'));
     foreach ($Videos as $vid) {
         $failedFiles++;
         $vid->ProcessingStatus = 'new';
         $vid->write();
         $vid->onAfterLoad();
         sleep(5);
     }
     echo "{$failedFiles} failed VideoFile objects have reinitiated the processing.";
 }
 /**
  * Overload this method to contain the task logic.
  */
 public function process()
 {
     if (isset($_REQUEST['VideoFileID']) && ($VideoFile = VideoFile::get()->byID($_REQUEST['VideoFileID']))) {
         $VideoFile->process();
     }
 }