Refactored notify_webstream_data

This commit is contained in:
Rudi Grinberg 2012-10-31 12:46:51 -04:00
parent 83211698a4
commit 11043d2eba
1 changed files with 2 additions and 10 deletions

View File

@ -424,13 +424,5 @@ class AirtimeApiClient(object):
Update the server with the latest metadata we've received from the
external webstream
"""
try:
url = self.construct_url("notify_webstream_data")
url = url.replace("%%media_id%%", str(media_id))
data = urllib.urlencode({'data': data})
self.logger.debug(url)
request = urllib2.Request(url, data)
self.logger.info(self.get_response_from_server(request, attempts = 5))
except Exception, e:
self.logger.error("Exception: %s", e)
self.logger.info( self.notify_webstream_data.req(
_post_data={'data':data}, media_id=str(media_id)).retry(5))