From 37498fbbf4fa1b9a7519ec84d0098942ce174854 Mon Sep 17 00:00:00 2001 From: Jeff Balogh Date: Thu, 26 May 2011 13:42:45 -0700 Subject: [PATCH] log the response from the builder --- apps/files/tasks.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/files/tasks.py b/apps/files/tasks.py index c842e4b736..95089a8c44 100644 --- a/apps/files/tasks.py +++ b/apps/files/tasks.py @@ -163,7 +163,6 @@ def start_upgrade(version, file_ids, priority='low', **kw): 'uuid': uuid.uuid4().hex, 'status': 'Sent to builder', 'owner': 'bulk'} - upgrader.file(file_.id, data) # Data POSTed to the builder. post = {'addon': file_.version.addon_id, @@ -174,8 +173,12 @@ def start_upgrade(version, file_ids, priority='low', **kw): 'uuid': data['uuid'], 'pingback': reverse('files.builder-pingback')} try: - urllib2.urlopen(settings.BUILDER_UPGRADE_URL, - urllib.urlencode(post)) + response = urllib2.urlopen(settings.BUILDER_UPGRADE_URL, + urllib.urlencode(post)) + jp_log.info('Response from builder for %s: [%s] %s' % + (file_.id, response.code, response.read())) except Exception: jp_log.error('Could not talk to builder for %s.' % file_.id, exc_info=True) + + upgrader.file(file_.id, data)