diff options
author | Erich Eckner <git@eckner.net> | 2018-09-12 09:16:09 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-09-12 09:16:09 +0200 |
commit | c67ca190d30757758928cd9c06a1a7a710a6d694 (patch) | |
tree | 0925d3361c306ea40bb0312a8aa16fcb4d15726f | |
parent | 80142b16c6bcaad0fcd7c7edb9678c2670c93836 (diff) | |
download | builder-c67ca190d30757758928cd9c06a1a7a710a6d694.tar.xz |
lib/mysql-functions: mysql_run_query(): wait 10..20 seconds between successive trials of mysql queries
-rwxr-xr-x | lib/mysql-functions | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/mysql-functions b/lib/mysql-functions index 15ed375..13a751e 100755 --- a/lib/mysql-functions +++ b/lib/mysql-functions @@ -48,6 +48,9 @@ mysql_run_query() { query_stderr="${query_stdin%.stdin}.stderr" cat > "${query_stdin}" for _ in {1..10}; do + if [ -f "${query_stdout}" ]; then + wait_some_time 10 10 + fi ${mysql_command} -N --raw --batch "$@" \ < "${query_stdin}" \ > "${query_stdout}" \ |