Skip to content

Commit

Permalink
fix: remove youtube chat components from app
Browse files Browse the repository at this point in the history
  • Loading branch information
parambharat committed Apr 1, 2024
1 parent 041eb98 commit bbae8e2
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions src/wandbot/api/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
from datetime import datetime, timezone

import pandas as pd
from fastapi import FastAPI

import wandb
from fastapi import FastAPI
from wandbot.api.routers import adcopy as adcopy_router
from wandbot.api.routers import chat as chat_router
from wandbot.api.routers import content_navigator as content_navigator_router
Expand Down Expand Up @@ -95,20 +94,8 @@ async def backup_db():
)
await asyncio.sleep(600)

async def delete_old_youtube_threads():
"""Periodically deletes old YoutubeAssistantThread records.
This function runs periodically and deletes YoutubeAssistantThread records that have not been updated in the last 24 hours.
Returns:
None
"""
while True:
database_router.db_client.delete_old_youtube_assistant_threads()
await asyncio.sleep(24 * 60 * 60) # sleep for 24 hours

_ = asyncio.create_task(backup_db())
_ = asyncio.create_task(delete_old_youtube_threads())

yield
if wandb.run is not None:
wandb.run.finish()
Expand Down

0 comments on commit bbae8e2

Please sign in to comment.