simplify _add_single to call update_status in PendingInteract directly

This commit is contained in:
simon 2022-05-02 21:38:03 +07:00
parent 8a4c50779a
commit 83beb53860
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
1 changed files with 1 additions and 4 deletions

View File

@ -19,7 +19,6 @@ from home.src.ta.ta_redis import RedisArchivist, RedisQueue
from home.tasks import (
download_pending,
download_single,
extrac_dl,
index_channel_playlists,
kill_dl,
re_sync_thumbs,
@ -230,9 +229,7 @@ class PostData:
"""add single youtube_id to download queue"""
video_id = self.exec_val
print(f"{video_id}: add single vid to download queue")
PendingInteract(video_id=video_id).delete_item()
video_ids = UrlListParser(video_id).process_list()
extrac_dl.delay(video_ids)
PendingInteract(video_id=video_id, status="pending").update_status()
return {"success": True}
def _delete_queue(self):