(self, config, ping=False)
| 244 | return config |
| 245 | |
| 246 | def set_config(self, config, ping=False): |
| 247 | self.config = config |
| 248 | if ping: |
| 249 | try: |
| 250 | result = self.ping_service() |
| 251 | if not result: |
| 252 | raise Exception("Grobid is down.") |
| 253 | except Exception as e: |
| 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... |
no test coverage detected