changeset 639:1c36cb1a1a0e

Cancellation for too heavy access
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 03 May 2020 16:50:46 +0900
parents b29e31dc3fbd
children b7aeab02d242
files s4-blog.sh
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/s4-blog.sh	Sun May 03 16:47:54 2020 +0900
+++ b/s4-blog.sh	Sun May 03 16:50:46 2020 +0900
@@ -227,6 +227,10 @@
 	FROM $ts WHERE id='$id' GROUP BY id;
 	EOF
   { IFS='|' read edit ctime hexhead blogtype
+    if [ -z "$ctime" ]; then	# Maybe database timeout
+      echo "時間をおいて繋いでください(Please visit later)." | html p
+      return
+    fi
     cat<<-EOF
 	<tr><td>${edit:+$href }$ctime $blogtype $href2$href3 $href4 $href5</td></tr>
 	<tr class="preface${frozen_class:+ }$frozen_class">

yatex.org