Implement queue dir delete for proc_state.delete_queue_file
Implement queue dir deleting in the proc_state.delete_queue_file helper function.
This commit is contained in:
parent
2dd0af3635
commit
8ec87dc3fd
@ -111,8 +111,13 @@ class ProcessingState(object):
|
|||||||
self.entry.media_files[keyname] = target_filepath
|
self.entry.media_files[keyname] = target_filepath
|
||||||
|
|
||||||
def delete_queue_file(self):
|
def delete_queue_file(self):
|
||||||
|
# Remove queued media file from storage and database.
|
||||||
|
# queued_filepath is in the task_id directory which should
|
||||||
|
# be removed too, but fail if the directory is not empty to be on
|
||||||
|
# the super-safe side.
|
||||||
queued_filepath = self.entry.queued_media_file
|
queued_filepath = self.entry.queued_media_file
|
||||||
mgg.queue_store.delete_file(queued_filepath)
|
mgg.queue_store.delete_file(queued_filepath) # rm file
|
||||||
|
mgg.queue_store.delete_dir(queued_filepath[:-1]) # rm dir
|
||||||
self.entry.queued_media_file = []
|
self.entry.queued_media_file = []
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user