From 13af83a6753d7d4423c1669e941f3fea53a58000 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 14 Jul 2023 22:33:43 +0200 Subject: mysql_run(): improve retry mechanism * try 15 times instead of 10 * increase time interval from trial to trial, hopefully hitting an empty spot sometime --- lib/mysql-functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/mysql-functions b/lib/mysql-functions index efa7c54..205c584 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -33,6 +33,7 @@ mysql_run_query() { local file local files local number + local trial file_name_extra='' if [ "$1" = 'unimportant' ]; then @@ -56,9 +57,9 @@ mysql_run_query() { fi cat } > "${query_stdin}" - for _ in $(seq 10); do + for trial in $(seq 15); do if [ -f "${query_stdout}" ]; then - wait_some_time 10 10 + wait_some_time "$((10*trial))" "$((10*trial))" fi if ${mysql_command} -N --raw --batch "$@" \ < "${query_stdin}" \ -- cgit v1.2.3-70-g09d2