[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: Try upload 3 times

2016-12-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Try upload 3 times
..


Try upload 3 times

Four shalt thou not count, neither count thou two, excepting that thou then
proceed to three. Five is right out.

Bug: T152352
Change-Id: I134c1235b7d2cda695d34e5ad4478ac86aac4098
---
M silverpop_export/upload.py
1 file changed, 10 insertions(+), 1 deletion(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/silverpop_export/upload.py b/silverpop_export/upload.py
index 950a3d4..8ab7e27 100644
--- a/silverpop_export/upload.py
+++ b/silverpop_export/upload.py
@@ -2,6 +2,7 @@
 
 import glob
 import os
+import sys
 
 import process
 from process.logging import Logger as log
@@ -36,6 +37,14 @@
 
 lock.begin()
 
-upload_most_recent()
+for i in range(3):
+try:
+upload_most_recent()
+break
+except:
+log.error("Ran into trouble: " + str(sys.exc_info()))
+
+if i == 2:
+raise
 
 lock.end()

-- 
To view, visit https://gerrit.wikimedia.org/r/325446
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I134c1235b7d2cda695d34e5ad4478ac86aac4098
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: Try upload 3 times

2016-12-05 Thread Awight (Code Review)
Awight has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/325446

Change subject: Try upload 3 times
..

Try upload 3 times

Four shalt thou not count, neither count thou two, excepting that thou then
proceed to three. Five is right out.

Bug: T152352
Change-Id: I134c1235b7d2cda695d34e5ad4478ac86aac4098
---
M silverpop_export/upload.py
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/46/325446/1

diff --git a/silverpop_export/upload.py b/silverpop_export/upload.py
index 950a3d4..ae7057a 100644
--- a/silverpop_export/upload.py
+++ b/silverpop_export/upload.py
@@ -2,6 +2,7 @@
 
 import glob
 import os
+import sys
 
 import process
 from process.logging import Logger as log
@@ -36,6 +37,14 @@
 
 lock.begin()
 
-upload_most_recent()
+for i in range(3):
+try:
+upload_most_recent()
+break
+except:
+log.error("Ran into trouble:" + str(sys.exc_info()))
+
+if i == 2:
+raise
 
 lock.end()

-- 
To view, visit https://gerrit.wikimedia.org/r/325446
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I134c1235b7d2cda695d34e5ad4478ac86aac4098
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Awight 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits