MCPcopy Create free account
hub / github.com/ScienciaLAB/document-qa / ping_service

Method ping_service

document_qa/ner_client_generic.py:256–268  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

254 raise Exception("Grobid is down or other problems were encountered. ", e)
255
256 def ping_service(self):
257 # test if the server is up and running...
258 ping_url = self.get_url("ping")
259
260 r = requests.get(ping_url)
261 status = r.status_code
262
263 if status != 200:
264 print("GROBID server does not appear up and running " + str(status))
265 return False
266 else:
267 print("GROBID server is up and running")
268 return True
269
270 def get_url(self, action):
271 grobid_config = self.config["grobid"]

Callers 2

__init__Method · 0.95
set_configMethod · 0.95

Calls 2

get_urlMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected