diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-02 15:12:07 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-16 15:30:14 -0700 |
commit | 3e9faf85da1ee2971e9ff2fde12b192ea470d806 (patch) | |
tree | 80edeca52f0229745b6a7221071121b049cd73fb /mediagoblin/processing/task.py | |
parent | 49db7785797a251ee408c62c0954ccd71af9d088 (diff) | |
download | mediagoblin-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.py | 12 |
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 ;) |