Index: trunk/phase3/maintenance/tables.sql |
— | — | @@ -1263,12 +1263,17 @@ |
1264 | 1264 | job_namespace int NOT NULL, |
1265 | 1265 | job_title varchar(255) binary NOT NULL, |
1266 | 1266 | |
| 1267 | + -- Timestamp of when the job was inserted |
| 1268 | + -- NULL for jobs added before addition of the timestamp |
| 1269 | + job_timestamp varbinary(14) NULL default NULL, |
| 1270 | + |
1267 | 1271 | -- Any other parameters to the command |
1268 | 1272 | -- Stored as a PHP serialized array, or an empty string if there are no parameters |
1269 | 1273 | job_params blob NOT NULL |
1270 | 1274 | ) /*$wgDBTableOptions*/; |
1271 | 1275 | |
1272 | 1276 | CREATE INDEX /*i*/job_cmd ON /*_*/job (job_cmd, job_namespace, job_title, job_params(128)); |
| 1277 | +CREATE INDEX /*i*/job_insert_timestamp ON /*_*/job(job_insert_timestamp); |
1273 | 1278 | |
1274 | 1279 | |
1275 | 1280 | -- Details of updates to cached special pages |
Index: trunk/phase3/maintenance/sqlite/archives/patch-jobs-add-timestamp.sql |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +ALTER TABLE /*_*/job ADD COLUMN job_timestamp varbinary(14) NULL default NULL; |
| 3 | +CREATE INDEX /*i*/job_timestamp ON /*_*/job(job_timestamp); |
Property changes on: trunk/phase3/maintenance/sqlite/archives/patch-jobs-add-timestamp.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 4 | + native |
Index: trunk/phase3/maintenance/archives/patch-jobs-add-timestamp.sql |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +ALTER TABLE /*_*/job ADD COLUMN job_timestamp varbinary(14) NULL default NULL; |
| 3 | +CREATE INDEX /*i*/job_timestamp ON /*_*/job(job_timestamp); |
Property changes on: trunk/phase3/maintenance/archives/patch-jobs-add-timestamp.sql |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 4 | + native |
Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -109,8 +109,9 @@ |
110 | 110 | * (bug 32512) Include 'associated namespace' checkbox on Special:Contributions |
111 | 111 | * Added $wgSend404Code, true by default, which can be set to false to send a |
112 | 112 | 200 status code instead of 404 for nonexistent articles. |
113 | | -* (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id |
114 | | -* (bug 33447) Link to the broken image tracking category from Special:Wantedfiles |
| 113 | +* (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id. |
| 114 | +* (bug 33447) Link to the broken image tracking category from Special:Wantedfiles. |
| 115 | +* (bug 27724) Add timestamp to job queue. |
115 | 116 | |
116 | 117 | === Bug fixes in 1.19 === |
117 | 118 | * $wgUploadNavigationUrl should be used for file redlinks if. |
Index: trunk/phase3/includes/job/JobQueue.php |
— | — | @@ -252,6 +252,10 @@ |
253 | 253 | } |
254 | 254 | $dbw = wfGetDB( DB_MASTER ); |
255 | 255 | $rows = array(); |
| 256 | + |
| 257 | + /** |
| 258 | + * @var $job Job |
| 259 | + */ |
256 | 260 | foreach ( $jobs as $job ) { |
257 | 261 | $rows[] = $job->insertFields(); |
258 | 262 | if ( count( $rows ) >= 50 ) { |
— | — | @@ -348,6 +352,7 @@ |
349 | 353 | 'job_cmd' => $this->command, |
350 | 354 | 'job_namespace' => $this->title->getNamespace(), |
351 | 355 | 'job_title' => $this->title->getDBkey(), |
| 356 | + 'job_insert_timestamp' => wfTimestampNow(), |
352 | 357 | 'job_params' => Job::makeBlob( $this->params ) |
353 | 358 | ); |
354 | 359 | } |
Index: trunk/phase3/includes/installer/SqliteUpdater.php |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ), |
72 | 72 | array( 'modifyField', 'user', 'ug_group', 'patch-ug_group-length-increase.sql' ), |
73 | 73 | array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ), |
74 | | - |
| 74 | + array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ), |
75 | 75 | ); |
76 | 76 | } |
77 | 77 | |
Index: trunk/phase3/includes/installer/MysqlUpdater.php |
— | — | @@ -191,6 +191,7 @@ |
192 | 192 | array( 'addIndex', 'page', 'page_redirect_namespace_len', 'patch-page_redirect_namespace_len.sql' ), |
193 | 193 | array( 'modifyField', 'user', 'ug_group', 'patch-ug_group-length-increase.sql' ), |
194 | 194 | array( 'addField', 'uploadstash', 'us_chunk_inx', 'patch-uploadstash_chunk.sql' ), |
| 195 | + array( 'addfield', 'job', 'job_timestamp', 'patch-jobs-add-timestamp.sql' ), |
195 | 196 | ); |
196 | 197 | } |
197 | 198 | |