r104191 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104190‎ | r104191 | r104192 >
Date:19:56, 24 November 2011
Author:aaron
Status:deferred
Tags:
Comment:
Modified paths:
  • /branches/FileBackend/phase3/includes/db/Database.php (modified) (history)
  • /branches/FileBackend/phase3/includes/db/DatabaseMysql.php (modified) (history)

Diff [purge]

Index: branches/FileBackend/phase3/includes/db/DatabaseMysql.php
@@ -703,6 +703,16 @@
704704 }
705705
706706 /**
 707+ * Determines how long the server has been up
 708+ *
 709+ * @return int
 710+ */
 711+ function getServerUptime() {
 712+ $vars = $this->getMysqlStatus( 'Uptime' );
 713+ return (int)$vars['Uptime'];
 714+ }
 715+
 716+ /**
707717 * Determines if the last failure was due to a deadlock
708718 *
709719 * @return bool
Index: branches/FileBackend/phase3/includes/db/Database.php
@@ -2640,6 +2640,16 @@
26412641 }
26422642
26432643 /**
 2644+ * Determines how long the server has been up
 2645+ * STUB
 2646+ *
 2647+ * @return int
 2648+ */
 2649+ function getServerUptime() {
 2650+ return 0;
 2651+ }
 2652+
 2653+ /**
26442654 * Determines if the last failure was due to a deadlock
26452655 * STUB
26462656 *

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r104190Added Database::getServerUptime() function to return seconds of uptimeaaron19:55, 24 November 2011

Status & tagging log