sonic-buildimage/src/system-health
Junchao-Mellanox 74c49a7682 [system-health] Fix file handle leak (#10059)
- Why I did it
swsscommon.ConfigDBConnector does not automatically close connection when the instance is recycled by python. So, it should not create this instance each time calling check_services. It will cause error like Failed to read from file /var/run/hw-management/led/led_status_capability - OSError(24, 'Too many open files')

- How I did it
Only connect DB once in init

- How to verify it
Manual test
2022-03-01 20:12:03 +00:00
..
health_checker [system-health] Fix file handle leak (#10059) 2022-03-01 20:12:03 +00:00
scripts [system-health] Convert to Python 3 (#5886) 2020-12-29 14:04:09 -08:00
tests [system-health] [202106] No longer check critical process/service status via monit (#9366) 2021-12-01 10:26:06 -08:00
.gitignore [system-health] Update .gitignore file (#5688) 2020-10-22 11:58:27 -07:00
pytest.ini [system-health] Add support for monitoring system health (#4835) 2020-10-12 11:12:49 +03:00
setup.cfg [system-health] Add support for monitoring system health (#4835) 2020-10-12 11:12:49 +03:00
setup.py [system-health] [202106] No longer check critical process/service status via monit (#9366) 2021-12-01 10:26:06 -08:00