Skip to content

Commit

Permalink
disable two pylint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
MrJs133 committed Dec 22, 2024
1 parent 72df8ce commit 97bf7fb
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hugegraph-llm/src/hugegraph_llm/demo/rag_demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def schedule_fit_vid_index():
log.info("Executing fit_vid_index function...")
fit_vid_index()
log.info("fit_vid_index function executed successfully.")
except Exception as e:
except Exception as e: #pylint: disable=W0718
log.error(e)

scheduler = BackgroundScheduler()
Expand All @@ -77,14 +77,12 @@ def schedule_fit_vid_index():
)

@asynccontextmanager
async def lifespan(app: FastAPI):
# Startup event
async def lifespan(app: FastAPI): #pylint: disable=W0621
if not scheduler.running:
scheduler.start()
log.info("Scheduler started successfully.")

# Shutdown event
yield # This marks the point where FastAPI waits for shutdown
yield

scheduler.shutdown()
log.info("Scheduler shut down.")
Expand Down

0 comments on commit 97bf7fb

Please sign in to comment.