Skip to content

Commit

Permalink
add health check
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <[email protected]>
  • Loading branch information
bedapudi6788 committed Aug 8, 2023
1 parent 799caef commit 9416bf5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion smartdash/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
EMAIL = "[email protected]"
AUTHOR = "BEDAPUDI PRANEETH"
REQUIRES_PYTHON = ">=3.6.0"
VERSION = "0.0.1.dev8"
VERSION = "0.0.1.dev9"

# What packages are required for this module to be executed?
REQUIRED = ["requests", "liteindex", "streamlit", "plotly", "gevent", "falcon", "gunicorn"]
Expand Down
5 changes: 5 additions & 0 deletions smartdash/smartdash/smartdash_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
auto_key=True,
)

class HealthCheck(object):
def on_get(self, req, resp):
resp.media = {"status": "ok"}


class GetDashMetrics(object):
def on_get(self, req, resp):
Expand Down Expand Up @@ -209,6 +213,7 @@ def main(port=8080):
app.add_route("/ml_inputs_outputs", AddMLInputsOutputs())
app.add_route("/app_names", AppNames())
app.add_route("/get_dash_metrics", GetDashMetrics())
app.add_route("/health", HealthCheck())

import gunicorn.app.base

Expand Down

0 comments on commit 9416bf5

Please sign in to comment.