smartAPI
smartAPI copied to clipboard
Implement a servers.url selecting logic in uptime monitoring
The current logic in src/utils/monitor.py is to pick the first entry from the servers block of API metadata:
https://github.com/SmartAPI/smartAPI/blob/9d2079135bed7ef57e2d55d6f8f79bd0e2e92104/src/utils/monitor.py#L113
We should implement a more flexible logic to pick the "preferred" servers.url entry for the uptime monitoring.
We can use the same logic from the BTE project, documented here:
https://github.com/biothings/BioThings_Explorer_TRAPI/issues/442
also summarized in:
https://github.com/NCATSTranslator/TranslatorArchitecture/issues/71#issuecomment-1110252733