r87958 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87957‎ | r87958 | r87959 >
Date:09:41, 13 May 2011
Author:dale
Status:deferred
Tags:
Comment:
fix for running multiple WebVideoJobRunners
Modified paths:
  • /trunk/extensions/TimedMediaHandler/WebVideoTranscode/transcodeTable.sql (modified) (history)
  • /trunk/extensions/TimedMediaHandler/maintenance/WebVideoJobRunner.php (modified) (history)

Diff [purge]

Index: trunk/extensions/TimedMediaHandler/maintenance/WebVideoJobRunner.php
@@ -33,9 +33,14 @@
3434 $this->threads = $this->getOption( 'threads' ) ;
3535 }
3636 // Check if WebVideoJobRuner is already running:
 37+ $jobRunnerCount = 0;
3738 foreach( $this->getProcessList() as $pid => $proc ){
3839 if( strpos( $proc['args'], 'WebVideoJobRunner.php' ) !== false ){
39 - $this->error( "WebVideoJobRunner.php is already running on this box with pid $pid" );
 40+ $jobRunnerCount++;
 41+ if( $jobRunnerCount > 1){
 42+ $this->error( "WebVideoJobRunner.php is already running on this box with pid $pid" );
 43+ exit(1);
 44+ }
4045 }
4146 }
4247 // Main runCheckJobThreadsLoop
Index: trunk/extensions/TimedMediaHandler/WebVideoTranscode/transcodeTable.sql
@@ -5,7 +5,7 @@
66 transcode_id INT NOT NULL AUTO_INCREMENT,
77 transcode_image_name VARCHAR(255) NOT NULL,
88 transcode_key VARCHAR(48) NOT NULL,
9 - transcode_error BLOB NOT NULL,
 9+ transcode_error longtext NOT NULL,
1010 transcode_time_addjob DATETIME NULL,
1111 transcode_time_startwork DATETIME NULL,
1212 transcode_time_success DATETIME NULL,

Status & tagging log