stop rclone deleting from taking so long
parent
d0f034fbf3
commit
d9321bdf9f
|
@ -325,3 +325,6 @@ if SITE == 'watchpeopledie.tv':
|
|||
from rclone_python import rclone
|
||||
def rclone_copy(filename):
|
||||
rclone.copy(filename, 'no:/videos', ignore_existing=True, show_progress=False)
|
||||
def rclone_delete(path):
|
||||
params = ("rclone", "deletefile", path)
|
||||
subprocess.run(params, check=True, timeout=30)
|
||||
|
|
|
@ -1895,7 +1895,7 @@ def delete_media_post(v):
|
|||
|
||||
if SITE == 'watchpeopledie.tv' and url.startswith(SITE_FULL_VIDEOS):
|
||||
filename = url.split(SITE_FULL_VIDEOS)[1]
|
||||
gevent.spawn(rclone.delete, f'no:/videos/{filename}')
|
||||
gevent.spawn(rclone_delete, f'no:/videos/{filename}')
|
||||
|
||||
return {"message": "Media deleted successfully!"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue