Fixed a bug that had binary stls be handled by the ascii stl parser.
[mediagoblin.git] / mediagoblin / media_types / stl / processing.py
index 3089f29512d917461a8dc19212a87001c76f9ba6..77744ac52b58ec889945c8e47ea5717dfce5b6f5 100644 (file)
@@ -21,7 +21,6 @@ import subprocess
 import pkg_resources
 
 from mediagoblin import mg_globals as mgg
-from mediagoblin.decorators import get_workbench
 from mediagoblin.processing import create_pub_filepath, \
     FilenameBuilder
 
@@ -76,13 +75,15 @@ def blender_render(config):
         env=env)
 
 
-@get_workbench
-def process_stl(entry, workbench=None):
+def process_stl(proc_state):
     """Code to process an stl or obj model. Will be run by celery.
 
     A Workbench() represents a local tempory dir. It is automatically
     cleaned up when this function exits.
     """
+    entry = proc_state.entry
+    workbench = proc_state.workbench
+
     queued_filepath = entry.queued_media_file
     queued_filename = workbench.localized_file(
         mgg.queue_store, queued_filepath, 'source')