예제 #1
0
파일: status.py 프로젝트: LeoIV/polyaxon
def get_status():
    status = {}
    status.update(CronsCheck.run())
    status.update(EventsCheck.run())
    status.update(HPSearchCheck.run())
    status.update(PipelinesCheck.run())
    status.update(PostgresCheck.run())
    status.update(RabbitMQCheck.run())
    status.update(RedisCheck.run())
    status.update(SchedulerCheck.run())
    status.update(StreamsCheck.run())
    return {k: v.to_dict() for k, v in status.items()}
예제 #2
0
    def test_scheduler_not_healthy(self, mock_health):
        mock_health.side_effect = Exception('Connection Refused')

        results = SchedulerCheck.run()
        assert results['SCHEDULER'].is_healthy is False
        assert results['SCHEDULER'].severity == Result.ERROR
예제 #3
0
    def test_scheduler_wrong_results(self, mock_health):
        mock_health.return_value.__enter__.return_value = None

        results = SchedulerCheck.run()
        assert results['SCHEDULER'].is_healthy is False
        assert results['SCHEDULER'].severity == Result.WARNING
예제 #4
0
 def test_scheduler_is_healthy(self):
     results = SchedulerCheck.run()
     assert results['SCHEDULER'].is_healthy is True