aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-08-13 12:52:22 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-08-13 12:52:22 -0500
commit2e5ea6b9b79244a0436264c5f1b606ec5328b70e (patch)
tree448b408a4066e2c547b95bc7a8d34d17d811b0ba
parent6788b4123ef00241d6b6c80ca93d655e4307d6e3 (diff)
downloadmediagoblin-2e5ea6b9b79244a0436264c5f1b606ec5328b70e.tar.lz
mediagoblin-2e5ea6b9b79244a0436264c5f1b606ec5328b70e.tar.xz
mediagoblin-2e5ea6b9b79244a0436264c5f1b606ec5328b70e.zip
@task decorator no longer used! Removing that import.
-rw-r--r--mediagoblin/process_media/__init__.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/mediagoblin/process_media/__init__.py b/mediagoblin/process_media/__init__.py
index 69e4fc45..18836919 100644
--- a/mediagoblin/process_media/__init__.py
+++ b/mediagoblin/process_media/__init__.py
@@ -17,7 +17,7 @@
import Image
from contextlib import contextmanager
-from celery.task import task, Task
+from celery.task import Task
from celery import registry
from mediagoblin.db.util import ObjectId
@@ -86,6 +86,18 @@ process_media = registry.tasks[ProcessMedia.name]
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
# type of error that we know how to handle?
if isinstance(exc, BaseProcessingFail):