forked from rDrama/rDrama
1
0
Fork 0

rclone should be inside a gevent to prevent db transaction timeout

master
Aevann 2024-02-21 22:37:39 +02:00
parent b8be8dcebd
commit 89d11fdb2d
1 changed files with 4 additions and 1 deletions

View File

@ -196,7 +196,7 @@ def process_video(file, v):
gevent.spawn(delete_file, new, f'https://videos.{SITE}' + new.split('/videos')[1])
if SITE == 'watchpeopledie.tv':
rclone.copy(new, 'no:/videos', ignore_existing=True)
gevent.spawn(send_file, new)
return f'https://videos.{SITE}' + new.split('/videos')[1]
else:
return f"{SITE_FULL}{new}"
@ -296,3 +296,6 @@ def delete_file(filename, url):
time.sleep(60)
os.remove(filename)
purge_files_in_cloudflare_cache(url)
def send_file(filename):
rclone.copy(filename, 'no:/videos', ignore_existing=True)