[debian-edu-commits] [Git][debian-edu/debian-edu-doc][master] debian/mail_stats_to_list: try git pull ten times with increasing pauses.

Holger Levsen (@holger) gitlab at salsa.debian.org
Sun Jan 16 01:55:42 GMT 2022



Holger Levsen pushed to branch master at Debian Edu / debian-edu-doc


Commits:
88653c68 by Holger Levsen at 2022-01-16T02:52:56+01:00
debian/mail_stats_to_list: try git pull ten times with increasing pauses.

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


2 changed files:

- debian/changelog
- debian/mail_stats_to_list


Changes:

=====================================
debian/changelog
=====================================
@@ -11,6 +11,9 @@ debian-edu-doc (2.12.7) UNRELEASED; urgency=medium
   * Buster manual:
     - Spanish: Eulalio Barbero Espinosa
 
+  [ Holger Levsen ]
+  * debian/mail_stats_to_list: try git pull ten times with increasing pauses. 
+
  -- Holger Levsen <holger at debian.org>  Wed, 29 Dec 2021 18:28:26 +0100
 
 debian-edu-doc (2.12.6) unstable; urgency=medium


=====================================
debian/mail_stats_to_list
=====================================
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright 2009-2021 Holger Levsen (holger at layer-acht.org)
+# Copyright 2009-2022 Holger Levsen (holger at layer-acht.org)
 # 
 # This program is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by the
@@ -35,10 +35,16 @@ report_problem(){
 }
 
 cd ~holger/debian-edu-doc
-git pull > /dev/null 2>&1
-RESULT=$?
-if [ $RESULT -ne 0 ] ; then
-	report_problem pull $RESULT
+PULLED=false
+for i in $(seq 1 10) ; do
+	if $(git pull > /dev/null 2>&1) ; then
+		PULLED=true
+		break
+	fi
+	sleep $(( 30 * $i )) # sleep 30s, then 60s, ...
+done
+if ! $PULLED ; then
+	report_problem pull unknown
 fi
 
 git status 2>&1



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/-/commit/88653c6894fd48d5f6a9ca738465cd8848cc4c46

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-doc/-/commit/88653c6894fd48d5f6a9ca738465cd8848cc4c46
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20220116/b49d239a/attachment-0001.htm>


More information about the debian-edu-commits mailing list