(self)
| 49 | return jsonify({'status': not self.search_control.is_set()}) |
| 50 | |
| 51 | def post_search_control(self): |
| 52 | args = get_args() |
| 53 | if not args.search_control: |
| 54 | return 'Search control is disabled', 403 |
| 55 | action = request.args.get('action', 'none') |
| 56 | if action == 'on': |
| 57 | self.search_control.clear() |
| 58 | log.info('Search thread resumed') |
| 59 | elif action == 'off': |
| 60 | self.search_control.set() |
| 61 | log.info('Search thread paused') |
| 62 | else: |
| 63 | return jsonify({'message': 'invalid use of api'}) |
| 64 | return self.get_search_control() |
| 65 | |
| 66 | def fullmap(self): |
| 67 | args = get_args() |
nothing calls this directly
no test coverage detected