Skip to content

Commit

Permalink
feat(app): introduce version (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop authored Sep 23, 2024
1 parent 196e615 commit 2ca1786
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/fal/src/fal/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ class App(fal.api.BaseServable):
}
app_name: ClassVar[str]
app_auth: ClassVar[Literal["private", "public", "shared"]] = "private"
version: ClassVar[str] = "unknown"
request_timeout: ClassVar[int | None] = None

def __init_subclass__(cls, **kwargs):
Expand Down Expand Up @@ -237,7 +238,7 @@ async def lifespan(self, app: FastAPI):
await _call_any_fn(self.teardown)

def health(self):
return {}
return {"version": self.version}

def setup(self):
"""Setup the application before serving."""
Expand Down

0 comments on commit 2ca1786

Please sign in to comment.