Added health endpoint
This commit is contained in:
parent
8b37cf5a29
commit
895574dbbc
8
app.py
8
app.py
@ -190,5 +190,13 @@ def get_speakers():
|
|||||||
logger.info(f"Sending speaker list for search term: '{search}' with {len(speaker_list)} results.")
|
logger.info(f"Sending speaker list for search term: '{search}' with {len(speaker_list)} results.")
|
||||||
return jsonify(speaker_list)
|
return jsonify(speaker_list)
|
||||||
|
|
||||||
|
@app.route('/health', methods=['GET'])
|
||||||
|
def health_check():
|
||||||
|
"""
|
||||||
|
Health check endpoint to verify that the server is running.
|
||||||
|
"""
|
||||||
|
logger.info("Health check requested.")
|
||||||
|
return jsonify({'status': 'ok'})
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host='0.0.0.0', port=18343)
|
app.run(host='0.0.0.0', port=18343)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user