com web/master: We disable mirrors right away - not passively with complicated sqls: scripts/mirror-summary
| From: | Hannes Magnusson | Date: | Mon, 27 Apr 2015 22:50:20 +0000 |
| Subject: | com web/master: We disable mirrors right away - not passively with complicated sqls: scripts/mirror-summary | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-21114@lists.php.net to get a copy of this message | ||
Commit: 67b2136ef230cbf879607cfff553549455b90614
Author: Hannes Magnusson <bjori@php.net> Mon, 27 Apr 2015 22:48:43 +0000
Parents: 1887419072e261ccd45c04cd51820f1c17375cdc
Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=67b2136ef230cbf879607cfff553549455b90614
Log:
We disable mirrors right away - not passively with complicated sqls
Changed paths:
M scripts/mirror-summary
Diff:
diff --git a/scripts/mirror-summary b/scripts/mirror-summary
index 75563ea..3a06f95 100755
--- a/scripts/mirror-summary
+++ b/scripts/mirror-summary
@@ -26,8 +26,7 @@ list($checktime) = mysql_fetch_row($lct);
// Select all mirrors ordered by hostname
$query = "SELECT maintainer, hostname, id, has_search, UNIX_TIMESTAMP(lastupdated) AS
lastupdate, " .
- "phpversion, (DATE_SUB(FROM_UNIXTIME($checktime), INTERVAL 3 DAY) < lastchecked)
AS active, " .
- "(DATE_SUB(FROM_UNIXTIME($checktime), INTERVAL 7 DAY) < lastupdated) AS current,
active AS enabled, acmt, ocmt " .
+ "phpversion, acmt, ocmt " .
"FROM mirrors ORDER BY hostname";
// Execute SQL query
@@ -62,20 +61,8 @@ if (count($inactives)) {
$body .= wordwrap(join(', ', array_keys($inactives))) . "\n";
}
-// List all mirrors which seem to be outdated
for ($i=0; $i < $total; $i++) {
- if ($hosts[$i]['active'] && !$hosts[$i]['current'] &&
!$hosts[$i]['enabled']) {
- $cmt = !empty($hosts[$i]['ocmt']) ? $hosts[$i]['ocmt'] :
$hosts[$i]['acmt'];
- $outdated[$hosts[$i]['hostname']] = array($hosts[$i]['maintainer'],
$cmt);
- }
-}
-if (count($outdated)) {
- $body .= "\nThese mirrors have not been updated in at least 7 days:\n\n";
- $body .= wordwrap(join(', ', array_keys($outdated))) . "\n";
-}
-
-for ($i=0; $i < $total; $i++) {
- if (!$hosts[$i]['enabled']) {
+ if (!$hosts[$i]['active']) {
$cmt = !empty($hosts[$i]['ocmt']) ? $hosts[$i]['ocmt'] :
$hosts[$i]['acmt'];
$disabled[$hosts[$i]['hostname']] = array($hosts[$i]['maintainer'],
$cmt);
}
@@ -111,7 +98,7 @@ function pad($deflen, $item) {
}
for ($i=0; $i < $total; $i++) {
- if ($hosts[$i]['active'] && $hosts[$i]['current']){
+ if ($hosts[$i]['active']){
$has_search = empty($hosts[$i]['has_search']) ? 'N' : 'Y';