From owner-svn-ports-head@freebsd.org Mon Apr 10 17:57:32 2017 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 67E04D37ABD; Mon, 10 Apr 2017 17:57:32 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03C80889; Mon, 10 Apr 2017 17:57:31 +0000 (UTC) (envelope-from cpm@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3AHvVph063514; Mon, 10 Apr 2017 17:57:31 GMT (envelope-from cpm@FreeBSD.org) Received: (from cpm@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3AHvU2n063512; Mon, 10 Apr 2017 17:57:30 GMT (envelope-from cpm@FreeBSD.org) Message-Id: <201704101757.v3AHvU2n063512@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cpm set sender to cpm@FreeBSD.org using -f From: "Carlos J. Puga Medina" Date: Mon, 10 Apr 2017 17:57:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r438194 - in head/sysutils/bsdstats: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Apr 2017 17:57:32 -0000 Author: cpm Date: Mon Apr 10 17:57:30 2017 New Revision: 438194 URL: https://svnweb.freebsd.org/changeset/ports/438194 Log: - Use anticongestion instead of simply sleeping. - Bump PORTREVISION svn r316342 added a common anticongestion routine that all periodic scripts should use instead of simply calling sleep. To test if it's available, a port should check for the anticongestion_sleeptime variable. PR: 218283 Submitted by: asomers Approved by: Yuri Victorovich (maintainer) Modified: head/sysutils/bsdstats/Makefile head/sysutils/bsdstats/files/300.statistics.in Modified: head/sysutils/bsdstats/Makefile ============================================================================== --- head/sysutils/bsdstats/Makefile Mon Apr 10 17:32:58 2017 (r438193) +++ head/sysutils/bsdstats/Makefile Mon Apr 10 17:57:30 2017 (r438194) @@ -3,7 +3,7 @@ PORTNAME= bsdstats PORTVERSION= 6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils DISTFILES= Modified: head/sysutils/bsdstats/files/300.statistics.in ============================================================================== --- head/sysutils/bsdstats/files/300.statistics.in Mon Apr 10 17:32:58 2017 (r438193) +++ head/sysutils/bsdstats/files/300.statistics.in Mon Apr 10 17:57:30 2017 (r438194) @@ -494,8 +494,16 @@ report_all() { setup_proxies test_connection log "INIT" "Connected to ${checkin_server_description}" - # sleep random number of seconds by default - test X"$1" = X-nodelay || ${SLEEP} $(random) + # When non-interactive, sleep to reduce congestion on bsdstats.org + if [ "$1" != -nodelay ]; then + # In FreeBSD 12.0 the anticongestion function should be used + # instead of a hard-coded sleep + if [ -n "$anticongestion_sleeptime" ]; then + anticongestion + else + ${SLEEP} $(random) + fi + fi # prepare get_id_token # begin