Unanswered
Hi All, Is There A Clean Way To Check If A Local Trains-Server Is Available? I Want To Set A Condition Weather To Set To Offline Mode Or Not. Thanks
edit: tweaked it a little bit for my use-case:is_demo_server = '
http://demoapi.trains.allegro.ai ' in Session.get_api_server_host()
is_server_available = requests.get(Session.get_api_server_host() + "/debug.ping").status_code == 200
168 Views
0
Answers
4 years ago
one year ago