Skip to content

Commit

Permalink
fix: ready/metrics
Browse files Browse the repository at this point in the history
fix: resources
  • Loading branch information
xgui3783 committed Dec 17, 2024
1 parent 515468b commit 60599b3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/docker-img.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,13 @@ jobs:
strategy:
fail-fast: false
matrix:
queue: ["core", "features", "compounds"]
resource: ["low"]
exclude:
- queue: "compounds"
resource: "low"
include:
- queue: "core"
resource: 'low'
- queue: "compounds"
resource: 'high'
- queue: "features"
resource: 'high'

if: ${{ github.event_name == 'release' && contains(github.ref, 'rc') }}
uses: ./.github/workflows/deploy-worker-helm-v4.yml
Expand Down
26 changes: 14 additions & 12 deletions api/server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,6 @@
expose_headers=[siibra_version_header]
)

@siibra_api.get("/metrics", include_in_schema=False)
def get_metrics():
"""Get prometheus metrics"""
return prom_metrics_resp()


@siibra_api.get("/ready", include_in_schema=False)
def get_ready():
"""Ready probe
TODO: implement me"""
return "ready"

_code_meta = None
@siibra_api.get("/about", include_in_schema=False)
Expand Down Expand Up @@ -391,6 +379,20 @@ async def exception_other(request: Request, exc: Exception):
templates = Jinja2Templates(directory="templates/")
siibra_api.mount("/static", StaticFiles(directory="static"), name="static")

@siibra_api.get("/metrics", include_in_schema=False)
def get_metrics():
"""Get prometheus metrics"""
return prom_metrics_resp()


@siibra_api.get("/ready", include_in_schema=False)
def get_ready():
"""Ready probe
TODO: implement me"""
return "ready"


# TODO lifespan not working properly. Fix and use lifespan in future
@siibra_api.on_event("shutdown")
def shutdown():
Expand Down

0 comments on commit 60599b3

Please sign in to comment.