We don't need to save entries during processing... also adding comments explaining such
This commit is contained in:
parent
af6a43d140
commit
6af6bc05bb
@ -144,7 +144,5 @@ def process_audio(entry):
|
|||||||
|
|
||||||
mgg.queue_store.delete_file(queued_filepath)
|
mgg.queue_store.delete_file(queued_filepath)
|
||||||
|
|
||||||
entry.save()
|
|
||||||
|
|
||||||
# clean up workbench
|
# clean up workbench
|
||||||
workbench.destroy_self()
|
workbench.destroy_self()
|
||||||
|
@ -135,6 +135,3 @@ def process_video(entry):
|
|||||||
entry.media_files['original'] = original_filepath
|
entry.media_files['original'] = original_filepath
|
||||||
|
|
||||||
mgg.queue_store.delete_file(queued_filepath)
|
mgg.queue_store.delete_file(queued_filepath)
|
||||||
|
|
||||||
# Save the MediaEntry
|
|
||||||
entry.save()
|
|
||||||
|
@ -51,8 +51,11 @@ class ProcessMedia(Task):
|
|||||||
|
|
||||||
_log.debug('Processing {0}'.format(entry))
|
_log.debug('Processing {0}'.format(entry))
|
||||||
|
|
||||||
|
# run the processing code
|
||||||
entry.media_manager['processor'](entry)
|
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.state = u'processed'
|
||||||
entry.save()
|
entry.save()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user