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 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits