From cf29e8a824e0ef4612f1144f079c80c1d20b89e5 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 2 Feb 2012 09:44:13 -0600 Subject: It's 2012 all up in here --- mediagoblin/processing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mediagoblin/processing.py') diff --git a/mediagoblin/processing.py b/mediagoblin/processing.py index cbac8030..4f1bf61b 100644 --- a/mediagoblin/processing.py +++ b/mediagoblin/processing.py @@ -1,5 +1,5 @@ # GNU MediaGoblin -- federated, autonomous media hosting -# Copyright (C) 2011 MediaGoblin contributors. See AUTHORS. +# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by -- cgit v1.2.3 From 64da09e86a755e49832e3c324582c65d352632d4 Mon Sep 17 00:00:00 2001 From: Joar Wandborg Date: Sat, 4 Feb 2012 20:51:05 +0100 Subject: ASCII media support - Fixes - Added debug logging in - mediagoblin.processing - mediagoblin.media_types.ascii.processing - mediagoblin.media_types.ascii.asciitoimage --- mediagoblin/processing.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'mediagoblin/processing.py') diff --git a/mediagoblin/processing.py b/mediagoblin/processing.py index 4f1bf61b..9e57380d 100644 --- a/mediagoblin/processing.py +++ b/mediagoblin/processing.py @@ -14,6 +14,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import logging + from celery.task import Task from mediagoblin.db.util import ObjectId @@ -23,6 +25,7 @@ from mediagoblin.tools.translate import lazy_pass_to_ugettext as _ from mediagoblin.media_types import get_media_manager +_log = logging.getLogger(__name__) THUMB_SIZE = 180, 180 MEDIUM_SIZE = 640, 640 @@ -57,12 +60,19 @@ class ProcessMedia(Task): try: #__import__(entry.media_type) manager = get_media_manager(entry.media_type) + _log.debug('Processing {0}'.format(entry)) manager['processor'](entry) except BaseProcessingFail, exc: mark_entry_failed(entry._id, exc) return except ImportError, exc: - mark_entry_failed(entry[u'_id'], exc) + _log.error( + 'Entry {0} failed to process due to an import error: {1}'\ + .format( + entry.title, + exc)) + + mark_entry_failed(entry._id, exc) entry.state = u'processed' entry.save() -- cgit v1.2.3