Conditions | 3 |
Total Lines | 20 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 1 |
CRAP Score | 9.933 |
Changes | 0 |
1 | 1 | import json |
|
10 | 1 | def get(self): |
|
11 | if self.should_fail_with_auth_error() != AuthErrorStates.NONE: |
||
12 | self.fail_with_auth_error() |
||
13 | return |
||
14 | |||
15 | self._add_CORS_header() |
||
16 | |||
17 | status_dict = {} |
||
18 | for k, v in self.python_service.ps.query_objects.items(): |
||
19 | status_dict[k] = { |
||
20 | "version": v["version"], |
||
21 | "type": v["type"], |
||
22 | "status": v["status"], |
||
23 | "last_error": v["last_error"], |
||
24 | } |
||
25 | |||
26 | self.logger.log(logging.DEBUG, f"Found models: {status_dict}") |
||
27 | self.write(json.dumps(status_dict)) |
||
28 | self.finish() |
||
29 | return |
||
30 |