grr/server/grr_response_server/databases/mem_flows.py
def ReadClientMessages(self, client_id):
    """Reads all client messages available for a given client_id."""
    res = []
    for msgs_by_id in itervalues(self.client_messages):
      for orig_msg in sorted(itervalues(msgs_by_id), key=lambda m: m.task_id):
        if db_utils.ClientIdFromGrrMessage(orig_msg) != client_id:
          continue
        msg = orig_msg.Copy()
        current_lease = self.client_message_leases.get(msg.task_id)
        if current_lease:
          msg.leased_until, msg.leased_by, _ = current_lease
        res.append(msg)

    return res
Reads all client messages available for a given client_id.
Reads all client messages available for a given client_id.
Reads all client messages available for a given client_id .
def ReadClientMessages(self, client_id):
    res = []
    for msgs_by_id in itervalues(self.client_messages):
      for orig_msg in sorted(itervalues(msgs_by_id), key=lambda m: m.task_id):
        if db_utils.ClientIdFromGrrMessage(orig_msg) != client_id:
          continue
        msg = orig_msg.Copy()
        current_lease = self.client_message_leases.get(msg.task_id)
        if current_lease:
          msg.leased_until, msg.leased_by, _ = current_lease
        res.append(msg)
    return res
def ReadClientMessages ( self , client_id ) : res = [ ] for msgs_by_id in itervalues ( self . client_messages ) : for orig_msg in sorted ( itervalues ( msgs_by_id ) , key = lambda m : m . task_id ) : if db_utils . ClientIdFromGrrMessage ( orig_msg ) != client_id : continue msg = orig_msg . Copy ( ) current_lease = self . client_message_leases . get ( msg . task_id ) if current_lease : msg . leased_until , msg . leased_by , _ = current_lease res . append ( msg ) return res
Reads all client messages available for a given client_id.
Reads all client messages available for a given client_id .
"""Reads all client messages available for a given client_id."""
self
client_id