@task decorator no longer used! Removing that import.

This commit is contained in:
Christopher Allan Webber 2011-08-13 12:52:22 -05:00
parent 6788b4123e
commit 2e5ea6b9b7

View File

@ -17,7 +17,7 @@
import Image import Image
from contextlib import contextmanager from contextlib import contextmanager
from celery.task import task, Task from celery.task import Task
from celery import registry from celery import registry
from mediagoblin.db.util import ObjectId from mediagoblin.db.util import ObjectId
@ -86,6 +86,18 @@ process_media = registry.tasks[ProcessMedia.name]
def mark_entry_failed(entry_id, exc): def mark_entry_failed(entry_id, exc):
"""
Mark a media entry as having failed in its conversion.
Uses the exception that was raised to mark more information. If the
exception is a derivative of BaseProcessingFail then we can store extra
information that can be useful for users telling them why their media failed
to process.
Args:
- entry_id: The id of the media entry
"""
# Was this a BaseProcessingFail? In other words, was this a # Was this a BaseProcessingFail? In other words, was this a
# type of error that we know how to handle? # type of error that we know how to handle?
if isinstance(exc, BaseProcessingFail): if isinstance(exc, BaseProcessingFail):