Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
nguu0123 committed Feb 15, 2024
1 parent a89c4f9 commit e67aa51
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion observability/ODOP_Ob/CSC_monitoring_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ async def subscribe(serviceUrl: ServiceUrl):
if __name__ == "__main__":
# start_subscription()

uvicorn.run(app, host="localhost", port=8001)
uvicorn.run(app, host="localhost", port=8001)
uvicorn.run("CSC_monitoring_service:app", host="localhost", port=8001, reload=True)
7 changes: 4 additions & 3 deletions observability/ODOP_Ob/ODOP_ObService.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ async def metric(resourceUsage: ResourceUsage):
raise HTTPException(status_code=400, detail=str(e))


odopObsService = ODOPObsService()
app.include_router(odopObsService.router)

if __name__ == "__main__":
odopObsService = ODOPObsService()
app.include_router(odopObsService.router)
uvicorn.run(app, host="localhost", port=8000)
uvicorn.run("ODOP_ObService:app", host="localhost", port=8000, reload=True)

0 comments on commit e67aa51

Please sign in to comment.