grr/server/grr_response_server/databases/mysql_flows.py
def ReadMessageHandlerRequests(self, cursor=None):
    """Reads all message handler requests from the database."""

    query = ("SELECT timestamp, request, leased_until, leased_by "
             "FROM message_handler_requests "
             "ORDER BY timestamp DESC")

    cursor.execute(query)

    res = []
    for timestamp, request, leased_until, leased_by in cursor.fetchall():
      req = rdf_objects.MessageHandlerRequest.FromSerializedString(request)
      req.timestamp = mysql_utils.MysqlToRDFDatetime(timestamp)
      req.leased_by = leased_by
      req.leased_until = mysql_utils.MysqlToRDFDatetime(leased_until)
      res.append(req)
    return res
Reads all message handler requests from the database.
Reads all message handler requests from the database.
Reads all message handler requests from the database .
def ReadMessageHandlerRequests(self, cursor=None):
    query = ("SELECT timestamp, request, leased_until, leased_by "
             "FROM message_handler_requests "
             "ORDER BY timestamp DESC")
    cursor.execute(query)
    res = []
    for timestamp, request, leased_until, leased_by in cursor.fetchall():
      req = rdf_objects.MessageHandlerRequest.FromSerializedString(request)
      req.timestamp = mysql_utils.MysqlToRDFDatetime(timestamp)
      req.leased_by = leased_by
      req.leased_until = mysql_utils.MysqlToRDFDatetime(leased_until)
      res.append(req)
    return res
def ReadMessageHandlerRequests ( self , cursor = None ) : query = ( "SELECT timestamp, request, leased_until, leased_by " "FROM message_handler_requests " "ORDER BY timestamp DESC" ) cursor . execute ( query ) res = [ ] for timestamp , request , leased_until , leased_by in cursor . fetchall ( ) : req = rdf_objects . MessageHandlerRequest . FromSerializedString ( request ) req . timestamp = mysql_utils . MysqlToRDFDatetime ( timestamp ) req . leased_by = leased_by req . leased_until = mysql_utils . MysqlToRDFDatetime ( leased_until ) res . append ( req ) return res
Reads all message handler requests from the database.
Reads all message handler requests from the database .
"""Reads all message handler requests from the database."""
self
cursor