def __init__(self, manager, media_entry):
self.manager = manager
self.media_entry = media_entry
+ self.entry_orig_state = media_entry.state
# Should be initialized at time of processing, at least
self.workbench = None
try:
processor_class = manager.get_processor(reprocess_action, entry)
- entry.state = u'processing'
- entry.save()
+ with processor_class(manager, entry) as processor:
+ # Initial state change has to be here because
+ # the entry.state gets recorded on processor_class init
+ entry.state = u'processing'
+ entry.save()
- _log.debug('Processing {0}'.format(entry))
+ _log.debug('Processing {0}'.format(entry))
- with processor_class(manager, entry) as processor:
processor.process(**reprocess_info)
# We set the state to processed and save the entry here so there's