Skip to content

Commit

Permalink
chore: remove source_type
Browse files Browse the repository at this point in the history
and removed an assert
  • Loading branch information
Ovler-Young committed Jun 15, 2024
1 parent aa5a9b5 commit 4a7af21
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions biliarchiver/rest_api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4a7af21

Please sign in to comment.