forgot to change to a class from a function after the refactor
authorRodney Ewing <ewing.rj@gmail.com>
Tue, 6 Aug 2013 16:17:37 +0000 (09:17 -0700)
committerRodney Ewing <ewing.rj@gmail.com>
Fri, 16 Aug 2013 22:30:15 +0000 (15:30 -0700)
mediagoblin/media_types/image/__init__.py
mediagoblin/media_types/image/processing.py

index de7de3ace5db9594e778a96481284ae355d95565..e2b00e504e5f53ec5d16d8ce9192cb84efa9c625 100644 (file)
@@ -19,7 +19,7 @@ import logging
 
 from mediagoblin.db.models import MediaEntry
 from mediagoblin.media_types import MediaManagerBase
-from mediagoblin.media_types.image.processing import process_image, \
+from mediagoblin.media_types.image.processing import ProcessImage, \
     sniff_handler
 from mediagoblin.submit.lib import run_process_media
 from mediagoblin.tools import pluginapi
@@ -38,7 +38,7 @@ def setup_plugin():
 
 class ImageMediaManager(MediaManagerBase):
     human_readable = "Image"
-    processor = staticmethod(process_image)
+    processor = ProcessImage
     display_template = "mediagoblin/media_displays/image.html"
     default_thumb = "images/media_thumbs/image.png"
 
index 665a2931b3f3c040f2f7e2689cfb1bc416d5f342..8126ea2d83cfba5adbf8fd47e4eed06876c93e2d 100644 (file)
@@ -124,7 +124,7 @@ def sniff_handler(media_file, **kw):
     return None
 
 
-def process_image(proc_state, reprocess_info=None):
+class ProcessImage(object):
     """Code to process an image. Will be run by celery.
 
     A Workbench() represents a local tempory dir. It is automatically