We don't need to save entries during processing... also adding comments explaining such

This commit is contained in:
Christopher Allan Webber 2012-12-12 10:13:56 -06:00
parent af6a43d140
commit 6af6bc05bb
3 changed files with 3 additions and 5 deletions

View File

@ -144,7 +144,5 @@ def process_audio(entry):
mgg.queue_store.delete_file(queued_filepath)
entry.save()
# clean up workbench
workbench.destroy_self()

View File

@ -135,6 +135,3 @@ def process_video(entry):
entry.media_files['original'] = original_filepath
mgg.queue_store.delete_file(queued_filepath)
# Save the MediaEntry
entry.save()

View File

@ -51,8 +51,11 @@ class ProcessMedia(Task):
_log.debug('Processing {0}'.format(entry))
# run the processing code
entry.media_manager['processor'](entry)
# 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 ;)
entry.state = u'processed'
entry.save()