diff options
Diffstat (limited to 'mediagoblin/processing')
-rw-r--r-- | mediagoblin/processing/__init__.py | 8 | ||||
-rw-r--r-- | mediagoblin/processing/task.py | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mediagoblin/processing/__init__.py b/mediagoblin/processing/__init__.py index a1fd3fb7..f3a85940 100644 --- a/mediagoblin/processing/__init__.py +++ b/mediagoblin/processing/__init__.py @@ -75,6 +75,14 @@ class FilenameBuilder(object): class ProcessingState(object): + """ + The first and only argument to the "processor" of a media type + + This could be thought of as a "request" to the processor + function. It has the main info for the request (media entry) + and a bunch of tools for the request on it. + It can get more fancy without impacting old media types. + """ def __init__(self, entry): self.entry = entry self.workbench = None diff --git a/mediagoblin/processing/task.py b/mediagoblin/processing/task.py index aec50aab..9af192ed 100644 --- a/mediagoblin/processing/task.py +++ b/mediagoblin/processing/task.py @@ -89,7 +89,7 @@ class ProcessMedia(task.Task): with mgg.workbench_manager.create() as workbench: proc_state.set_workbench(workbench) # run the processing code - entry.media_manager['processor'](proc_state) + entry.media_manager.processor(proc_state) # We set the state to processed and save the entry here so there's # no need to save at the end of the processing stage, probably ;) |