From 24a410b956c06a47b2a26d6c7fa59c6872a7248a Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Fri, 5 Mar 2021 23:59:37 -0700 Subject: [PATCH] lint-all-readme.pl/sanity-check.pl: be nice Call nice_me to make sure that running these introspection commands does not take out the server (or at lease impair its performance in a noticeable way). Signed-off-by: Kyle J. McKay --- toolbox/lint-all-readme.pl | 3 ++- toolbox/sanity-check.pl | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/toolbox/lint-all-readme.pl b/toolbox/lint-all-readme.pl index 5965063..a969af8 100755 --- a/toolbox/lint-all-readme.pl +++ b/toolbox/lint-all-readme.pl @@ -35,7 +35,7 @@ HELP sub lint_project_readmes { my ($dryrun, $show_progress) = @_; my %allprojs = map({$_ => 1} Girocco::Project::get_full_list()); - my @allprojs = sort({lc($a) cmp lc($b)} keys(%allprojs)); + my @allprojs = sort({lc($a) cmp lc($b) || $a cmp $b} keys(%allprojs)); my @outdated = (); my @badlint = (); my $bd = $Girocco::Config::reporoot . '/'; @@ -99,6 +99,7 @@ sub main { shift, $progress=0, redo if @ARGV && $ARGV[0] =~ /^(?:--no-progress)$/i; } !@ARGV && !$help or dohelp($help ? \*STDOUT : \*STDERR, !$help); + nice_me(18); my $results = lint_project_readmes(!!$dryrun, $progress); printf "Total: %d %s: %d Lintfail: %d\n", $results->{count}, diff --git a/toolbox/sanity-check.pl b/toolbox/sanity-check.pl index 75a8b69..c372216 100755 --- a/toolbox/sanity-check.pl +++ b/toolbox/sanity-check.pl @@ -216,6 +216,7 @@ sub main { !@ARGV && !$help or dohelp($help ? \*STDOUT : \*STDERR, !$help); $show_progress = $progress; $errs = 0; + nice_me(); check_users; check_projects; print "User-count: ".scalar(keys(%users)). -- 2.11.4.GIT