Merge branch 'cc-4661-listener-statistics' into devel

Conflicts:
	python_apps/api_clients/api_client.py
This commit is contained in:
James 2012-11-07 17:20:12 -05:00
commit 7300b608cf
52 changed files with 22519 additions and 14 deletions

View file

@ -121,3 +121,6 @@ notify_webstream_data = 'notify-webstream-data/api_key/%%api_key%%/media_id/%%me
notify_liquidsoap_started = 'rabbitmq-do-push/api_key/%%api_key%%/format/json'
get_stream_parameters = 'get-stream-parameters/api_key/%%api_key%%/format/json'
push_stream_stats = 'push-stream-stats/api_key/%%api_key%%/format/json'

View file

@ -388,5 +388,14 @@ class AirtimeApiClient(object):
Update the server with the latest metadata we've received from the
external webstream
"""
self.logger.info( self.notify_webstream_data.req(
self.logger.info( self.services.notify_webstream_data.req(
_post_data={'data':data}, media_id=str(media_id)).retry(5))
def get_stream_parameters(self):
response = self.services.get_stream_parameters()
self.logger.debug(response)
return response
def push_stream_stats(self, data):
# TODO : users of this method should do their own error handling
response = self.services.push_stream_stats(_post_data={'data': json.dumps(data)})