From bdfe6c442f526ebc0c975886c0f5d346620e3501 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 7 Nov 2019 15:10:44 +0100 Subject: lib/mysql.php: show_warning_on_offline_slave(): buildmaster.archlinux32.org does *not* need to have a running mysql replication slave --- lib/mysql.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/mysql.php b/lib/mysql.php index 66fe82f..f7ca3ed 100644 --- a/lib/mysql.php +++ b/lib/mysql.php @@ -53,10 +53,12 @@ function mysql_prepare_query($query) { } function show_warning_on_offline_slave() { - $result = mysql_run_query("SHOW STATUS LIKE \"Slave_running\""); - if (($result -> num_rows == 0) || - ($result -> fetch_assoc() ["Value"] != "ON")) { - print "
The replication slave is currently not running. The database might be outdated.
\n"; + if (gethostname() != 'buildmaster.archlinux32.org') { + $result = mysql_run_query("SHOW STATUS LIKE \"Slave_running\""); + if (($result -> num_rows == 0) || + ($result -> fetch_assoc() ["Value"] != "ON")) { + print "
The replication slave is currently not running. The database might be outdated.
\n"; + } } } -- cgit v1.2.3-70-g09d2