def queue_completion(self, request_id, completion_type, completion_data, query=None): with self.lock: ccr = Request(request_id, completion_type, completion_data, query) self.latest_completion_request_id = ccr.id self.main_queue.put((COMPLETION_REQUEST, ccr))
def queue_completion(self, request_id, completion_type, completion_data, query=None): with self.lock: self.current_completion_request = Request(request_id, completion_type, completion_data, query) self.latest_completion_request_id = self.current_completion_request.id self.main_queue.put((COMPLETION_REQUEST, None))
def clear_caches(self, cache_type=None): self.main_queue.put( (CLEAR_REQUEST, Request(None, 'clear_caches', cache_type, None)))