diff options
author | Joar Wandborg <git@wandborg.com> | 2012-02-04 20:51:05 +0100 |
---|---|---|
committer | Joar Wandborg <git@wandborg.com> | 2012-02-04 20:51:05 +0100 |
commit | 64da09e86a755e49832e3c324582c65d352632d4 (patch) | |
tree | e846691fdd6cd79dafe03c9760af3e92148632d8 /mediagoblin/processing.py | |
parent | 010d28b4f0a39103949692209106a1b47fceeaf2 (diff) | |
download | mediagoblin-64da09e86a755e49832e3c324582c65d352632d4.tar.lz mediagoblin-64da09e86a755e49832e3c324582c65d352632d4.tar.xz mediagoblin-64da09e86a755e49832e3c324582c65d352632d4.zip |
ASCII media support - Fixes
- Added debug logging in
- mediagoblin.processing
- mediagoblin.media_types.ascii.processing
- mediagoblin.media_types.ascii.asciitoimage
Diffstat (limited to 'mediagoblin/processing.py')
-rw-r--r-- | mediagoblin/processing.py | 12 |
1 files changed, 11 insertions, 1 deletions
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 <http://www.gnu.org/licenses/>. +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() |