chore: remove source_type

and removed an assert
This commit is contained in:
Ovler 2024-06-15 13:24:17 +00:00
parent aa5a9b5b7d
commit 4a7af219a6

View File

@ -106,7 +106,7 @@ async def delete(vid: str):
return {"success": False, "vid": vid, "status": "not_found"}
async def source_action(fun, source_type: str, source_id: str, TRUNCATE=20):
async def source_action(fun, source_id: str, TRUNCATE=20):
try:
txt_path = await fun(source_id, truncate=TRUNCATE)
except Exception as e:
@ -139,9 +139,8 @@ async def perform_source_action_from_req(source_type: str, source_id: str):
fun = fun_mapping[source_type]
assert callable(fun)
assert isinstance(source_id, str)
return await source_action(fun, source_type, source_id, TRUNCATE=int(9e99))
return await source_action(fun, source_id, TRUNCATE=int(9e99))
async def video_scheduler():
while True: