# Online Bash Shell.
# Code, Compile, Run and Debug Bash script online.
# Write your code in this editor and press "Run" button to execute it.
response='{"db":{"status":"healthy"},"scheduler":{"fetch":"2024-03-12T04:32:53.060917+00:00","status":"healthy"}}'; python3 -c "import sys, json; print('Scheduler is healthy' if json.loads(sys.argv[1])['scheduler']['status'] == 'healthy' else 'Scheduler is not healthy')" "$response"
responsex='{"db":{"status":"healthy"},"scheduler":{"fetch":"2024-03-12T04:32:53.060917+00:00","status":"unhealthy"}}'; python3 -c "import sys, json; print('Scheduler is healthy' if json.loads(sys.argv[1])['scheduler']['status'] == 'healthy' else 'Scheduler is not healthy')" "$responsex"