From 9fdfc0a957479bea1b8ec6a20ecdbc8695e583fa Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Wed, 23 Apr 2014 17:42:09 -0400 Subject: [PATCH] CC-5709: Airtime Analyzer * Catch exceptions related to unpickling the HTTP request queue --- .../airtime_analyzer/airtime_analyzer/status_reporter.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py b/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py index ee5062943..33f082cd3 100644 --- a/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py +++ b/python_apps/airtime_analyzer/airtime_analyzer/status_reporter.py @@ -45,6 +45,13 @@ def process_http_requests(ipc_queue, http_retry_queue_path): pass else: raise e + except Exception as e: + # If we fail to unpickle a saved queue of failed HTTP requests, then we'll just log an error + # and continue because those HTTP requests are lost anyways. The pickled file will be + # overwritten the next time the analyzer is shut down too. + logging.error("Failed to unpickle %s. Continuing..." % http_retry_queue_path) + pass + while not shutdown: try: