Skip to content

Commit

Permalink
add readyness and liveness probe endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
danceb committed Dec 16, 2024
1 parent abd8821 commit da02b65
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ def resources():
return jsonify({'error': str(e)}), 500


""" readyness probe endpoint """
@app.route("/ready", methods=['GET'])
def ready():
return jsonify({"status": "OK"})


""" liveness probe endpoint """
@app.route("/healthz", methods=['GET'])
def healthz():
return jsonify({"status": "OK"})


# local webserver
if __name__ == '__main__':
print("Starting ConfigGenerator service...")
Expand Down

0 comments on commit da02b65

Please sign in to comment.