def _Dynamic_Subscribe(self, request, response):
    ValidateSubscriptionId(request.sub_id())
    ValidateTopic(request.topic())

    ValidateQuery(request.vanilla_query())
    schema = self._Get_Schema(request.schema_entry_list())
    self.topics_schema[request.topic()] = schema
    if request.lease_duration_sec() == 0:
      expires = time.time() + 0xffffffff
    else:
      expires = time.time() + request.lease_duration_sec()
    topic_subs = self.topics.setdefault(request.topic(), {})
    topic_subs[request.sub_id()] = (request.vanilla_query(), expires)
    self._Write()
Subscribe a query.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/api/prospective_search/prospective_search_stub.py/ProspectiveSearchStub._Dynamic_Subscribe