(self)
| 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"] |
no test coverage detected