Esempio n. 1
0
 def _store_in_agent_queue(self, operation):
     """Add the operation inside of the agent queue collection
     Args:
         operation (dict): The dictionary of the operation.
     """
     agent_queue = (AgentQueue(operation[OperationPerAgentKey.AgentId],
                               self.customer_name))
     agent_queue.add(operation, self.server_queue_ttl, self.agent_queue_ttl)
Esempio n. 2
0
def process_queue_data(agent_id, username, customer_name, uri, method):
    agent_queue = AgentQueue(agent_id, customer_name).pop_agent_queue()
    for operation in agent_queue:
        if operation.get(AgentOperationKey.OperationId):
            oper = (AgentOperation(username, customer_name))
            oper.update_operation_pickup_time(
                operation[AgentOperationKey.OperationId], agent_id)

    return agent_queue
Esempio n. 3
0
def store_in_agent_queue(operation):

    operation = operation.to_dict()
    agent_queue = AgentQueue(operation.agent_id, operation.customer_name)
    agent_queue.add(operation)