Merlijn van Deen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394133 )

Change subject: Catch, log and re-raise all exceptions at highest level
......................................................................

Catch, log and re-raise all exceptions at highest level

Change-Id: I38b46675ac7b10323c7cf889ce6777415fa2178c
---
M forrestbot.py
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/forrestbot 
refs/changes/33/394133/1

diff --git a/forrestbot.py b/forrestbot.py
index 9d7debc..5066297 100644
--- a/forrestbot.py
+++ b/forrestbot.py
@@ -169,7 +169,7 @@
 # query projects
 
 
-if __name__ == "__main__":
+def main():
     logging.basicConfig(
         level=logging.INFO,
         format='%(asctime)s: %(levelname)-8s - %(message)s'
@@ -239,3 +239,10 @@
             )
 
     mailbox.quit()
+
+if __name__=="__main__":
+    try:
+        main()
+    except Exception as e:
+        logger.exception("Releasetaggerbot crashed while processing messages")
+        raise

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38b46675ac7b10323c7cf889ce6777415fa2178c
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/forrestbot
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to