From 2c919a48ffcdaab141b5887db5b82beb5619c01d Mon Sep 17 00:00:00 2001 From: Neil Lathwood Date: Sat, 9 Dec 2017 17:19:56 +0000 Subject: [PATCH] fix: Re-added peeringdb back into daily.sh (#7884) --- daily.sh | 4 ++++ includes/functions.php | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/daily.sh b/daily.sh index 648ab7905d..5467ae2da5 100755 --- a/daily.sh +++ b/daily.sh @@ -226,6 +226,10 @@ main () { local options=("notifications"); call_daily_php "${options[@]}"; ;; + peeringdb) + local options=("peeringdb"); + call_daily_php "${options[@]}"; + ;; esac fi } diff --git a/includes/functions.php b/includes/functions.php index 5186b15374..f87591d9de 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -2282,7 +2282,7 @@ function cache_peeringdb() // We cache for 71 hours $cached = dbFetchCell("SELECT count(*) FROM `pdb_ix` WHERE (UNIX_TIMESTAMP() - timestamp) < 255600"); if ($cached == 0) { - $rand = rand(30, 600); + $rand = rand(3, 30); echo "No cached PeeringDB data found, sleeping for $rand seconds" . PHP_EOL; sleep($rand); foreach (dbFetchRows("SELECT `bgpLocalAs` FROM `devices` WHERE `disabled` = 0 AND `ignore` = 0 AND `bgpLocalAs` > 0 AND (`bgpLocalAs` < 64512 OR `bgpLocalAs` > 65535) AND `bgpLocalAs` < 4200000000 GROUP BY `bgpLocalAs`") as $as) {