send_simple_message
Description
Appends a message for a specified (destination) experiment to the message queue.
Experiments may pass messages to other experiments. Messages are objects which may have any format (as long as MongoDB accepts them, that is), and they have associated with them a source experiment id, and a destination experiment id. When messages are submitted they are appended to a message queue for each destination experiment. They are retrieved from the message queue using the get_simple_message endpoint.
Arguments:
'experiment_id' -- destination experiment id 'message' -- the message object
Simple Example
eid = str(uuid.uuid1())
msg = "test"+str(uuid.uuid1())
resp = pq.send_simple_message({'experiment_id':eid,'message':msg},remote=True)
Simple Example Output
Failure Examples
msg = "test"+str(uuid.uuid1())
resp = pq.send_simple_message({'message':msg},remote=True)
Failure Examples Output
Three Examples
eid = str(uuid.uuid1())
resp = pq.send_simple_message({'experiment_id':eid},remote=True)
####################################
msg = "test"+str(uuid.uuid1())
resp = pq.send_simple_message({'experiment_id': None, 'message':msg},remote=True)
###################################
eid = str(uuid.uuid1())
resp = pq.send_simple_message({'experiment_id':eid,'message':None},remote=True)