Merge branch 'cc-5709-airtime-analyzer' into cc-5709-airtime-analyzer-cloud-storage
Conflicts: airtime_mvc/application/models/StoredFile.php airtime_mvc/application/modules/rest/controllers/MediaController.php python_apps/airtime_analyzer/airtime_analyzer/analyzer_pipeline.py
This commit is contained in:
commit
884a4c493d
103 changed files with 30564 additions and 20054 deletions
|
@ -27,7 +27,7 @@ QUEUE = "airtime-uploads"
|
|||
Airtime's music library directory. Lastly, the extracted metadata is
|
||||
reported back to the Airtime web application.
|
||||
|
||||
There's a couple of Very Important technical details and contraints that you
|
||||
There's a couple of Very Important technical details and constraints that you
|
||||
need to know if you're going to work on this code:
|
||||
|
||||
1) airtime_analyzer is designed so it doesn't have to run on the same
|
||||
|
|
|
@ -85,6 +85,7 @@ def process_http_requests(ipc_queue, http_retry_queue_path):
|
|||
# while the web server is down or unreachable.
|
||||
with open(http_retry_queue_path, 'wb') as pickle_file:
|
||||
pickle.dump(retry_queue, pickle_file)
|
||||
return
|
||||
except Exception as e: # Terrible top-level exception handler to prevent the thread from dying, just in case.
|
||||
if shutdown:
|
||||
return
|
||||
|
@ -98,13 +99,13 @@ def send_http_request(picklable_request, retry_queue):
|
|||
if not isinstance(picklable_request, PicklableHttpRequest):
|
||||
raise TypeError("picklable_request must be a PicklableHttpRequest. Was of type " + type(picklable_request).__name__)
|
||||
try:
|
||||
t = threading.Timer(60, alert_hung_request)
|
||||
t.start()
|
||||
#t = threading.Timer(60, alert_hung_request)
|
||||
#t.start()
|
||||
bare_request = picklable_request.create_request()
|
||||
s = requests.Session()
|
||||
prepared_request = s.prepare_request(bare_request)
|
||||
r = s.send(prepared_request, timeout=StatusReporter._HTTP_REQUEST_TIMEOUT)
|
||||
t.cancel() # Watchdog no longer needed.
|
||||
#t.cancel() # Watchdog no longer needed.
|
||||
r.raise_for_status() # Raise an exception if there was an http error code returned
|
||||
logging.info("HTTP request sent successfully.")
|
||||
except requests.exceptions.HTTPError as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue