Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-07-14 22:33:43 +0200
committerErich Eckner <git@eckner.net>2023-07-14 22:33:43 +0200
commit13af83a6753d7d4423c1669e941f3fea53a58000 (patch)
treebdf07a643971c922ed6585589b434a405eb4069d /lib
parentddf0be8a7d00ad20f9dd73e244cf50c6baf779f2 (diff)
mysql_run(): improve retry mechanism
* try 15 times instead of 10 * increase time interval from trial to trial, hopefully hitting an empty spot sometime
Diffstat (limited to 'lib')
-rwxr-xr-xlib/mysql-functions5
1 files changed, 3 insertions, 2 deletions
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}" \