Skip to content

Commit

Permalink
Remove unused session management in video download function
Browse files Browse the repository at this point in the history
  • Loading branch information
Satish Surath committed Feb 4, 2025
1 parent 2695a4a commit b07822a
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,14 +162,11 @@ def api_channel_start():
}

def run_download():
session = SessionLocal()
try:
# This function now ensures that for every video,
# a row in video_folders(folder_name=<channel_id>, video_id=...) is inserted
download_channel_transcripts(channel_url, download_statuses[task_id])
download_statuses[task_id]["status"] = "completed"
finally:
session.close()
except Exception as e:
logger.error(f"Error in channel download: {e}")
download_statuses[task_id]["status"] = "failed"
Expand Down

0 comments on commit b07822a

Please sign in to comment.