grr/test_lib/flow_test_lib.py
def PushToStateQueue(self, manager, message, **kw):
    """Push given message to the state queue."""
    # Assume the client is authorized
    message.auth_state = rdf_flows.GrrMessage.AuthorizationState.AUTHENTICATED

    # Update kw args
    for k, v in iteritems(kw):
      setattr(message, k, v)

    # Handle well known flows
    if message.request_id == 0:
      self._PushHandlerMessage(message)
      return

    # Use REL_DB if it's enabled and if message in question has to be
    # delivered to a client. Messages for hunts have to be delivered
    # using the legacy queue manager until REL_DB hunts implementation
    # is complete.
    if data_store.RelationalDBFlowsEnabled() and str(
        message.session_id).startswith("aff4:/C."):
      data_store.REL_DB.WriteFlowResponses(
          [rdf_flow_objects.FlowResponseForLegacyResponse(message)])
    else:
      manager.QueueResponse(message)
Push given message to the state queue.
Push given message to the state queue.
Push given message to the state queue .
def PushToStateQueue(self, manager, message, **kw):
    message.auth_state = rdf_flows.GrrMessage.AuthorizationState.AUTHENTICATED
    for k, v in iteritems(kw):
      setattr(message, k, v)
    if message.request_id == 0:
      self._PushHandlerMessage(message)
      return
    if data_store.RelationalDBFlowsEnabled() and str(
        message.session_id).startswith("aff4:/C."):
      data_store.REL_DB.WriteFlowResponses(
          [rdf_flow_objects.FlowResponseForLegacyResponse(message)])
    else:
      manager.QueueResponse(message)
def PushToStateQueue ( self , manager , message , ** kw ) : message . auth_state = rdf_flows . GrrMessage . AuthorizationState . AUTHENTICATED for k , v in iteritems ( kw ) : setattr ( message , k , v ) if message . request_id == 0 : self . _PushHandlerMessage ( message ) return if data_store . RelationalDBFlowsEnabled ( ) and str ( message . session_id ) . startswith ( "aff4:/C." ) : data_store . REL_DB . WriteFlowResponses ( [ rdf_flow_objects . FlowResponseForLegacyResponse ( message ) ] ) else : manager . QueueResponse ( message )
Push given message to the state queue.
Push given message to the state queue .
"""Push given message to the state queue.""" # Assume the client is authorized # Update kw args # Handle well known flows # Use REL_DB if it's enabled and if message in question has to be # delivered to a client. Messages for hunts have to be delivered # using the legacy queue manager until REL_DB hunts implementation # is complete.
self
manager
message