aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/processing/task.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-08-02 15:12:07 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-08-16 15:30:14 -0700
commit3e9faf85da1ee2971e9ff2fde12b192ea470d806 (patch)
tree80edeca52f0229745b6a7221071121b049cd73fb /mediagoblin/processing/task.py
parent49db7785797a251ee408c62c0954ccd71af9d088 (diff)
downloadmediagoblin-3e9faf85da1ee2971e9ff2fde12b192ea470d806.tar.lz
mediagoblin-3e9faf85da1ee2971e9ff2fde12b192ea470d806.tar.xz
mediagoblin-3e9faf85da1ee2971e9ff2fde12b192ea470d806.zip
added comments and did a little refactoring. not sure if it is actually any clearer though
Diffstat (limited to 'mediagoblin/processing/task.py')
-rw-r--r--mediagoblin/processing/task.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/mediagoblin/processing/task.py b/mediagoblin/processing/task.py
index c0dfb9b4..36ee31fd 100644
--- a/mediagoblin/processing/task.py
+++ b/mediagoblin/processing/task.py
@@ -89,9 +89,17 @@ class ProcessMedia(task.Task):
proc_state = ProcessingState(entry)
with mgg.workbench_manager.create() as workbench:
+
proc_state.set_workbench(workbench)
- # run the processing code
- entry.media_manager.processor(proc_state, reprocess_info)
+ processor = entry.media_manager.processor(proc_state)
+
+ # If we have reprocess_info, let's reprocess
+ if reprocess_info:
+ processor.reprocess(reprocess_info)
+
+ # Run initial processing
+ else:
+ processor.initial_processing()
# 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 ;)