Beispiel #1
0
def notify_worker(id, sizes):
	jsonMessage = json.dumps(
					{
						'id': id,
						'sizes': sizes
					}
				)
	message = Message()
	message.set_body(jsonMessage)
	queue.write(message)
Beispiel #2
0
def notify_robot(userid, command,devicename,executedate):
    data = {
                'requestdate' : time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime()),
                'executedate' : executedate,
                'userid' : userid,
                'command' :command,
                'devicename' : devicename
           }
    m = RawMessage()
    m.set_body(json.dumps(data))
    status = queue.write(m)
    print 'your message sent : %s , status : %s, executedate:%s ' % ( m,status, executedate)
Beispiel #3
0
def notify_worker(id, sizes):
	data = {
                'submitdate' : time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime()),
                'id' : id,
                'sizes' :sizes
        }
     
        
        m = RawMessage()
        m.set_body(json.dumps(data))
        status = queue.write(m)
	print 'your message sent : %s , status : %s ' % ( m,status)
Beispiel #4
0
def notify_robot(userid, command, devicename, executedate):
    data = {
        'requestdate': time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime()),
        'executedate': executedate,
        'userid': userid,
        'command': command,
        'devicename': devicename
    }
    m = RawMessage()
    m.set_body(json.dumps(data))
    status = queue.write(m)
    print 'your message sent : %s , status : %s, executedate:%s ' % (
        m, status, executedate)
Beispiel #5
0
def notify_worker(id, sizes):
	# raise Exception('Implement me!')	
	sqsMessage = Message()

	jsonMessage = {
		"id" : id,
		"sizes" : sizes
	}

	sqsMessage.set_body(json.dumps(jsonMessage))

	status = queue.write(sqsMessage)

	return
def notify_worker(id, sizes):	
	m = Message()
	m.set_body(setupMessageJSON(id, sizes))
	#m.set_body("hello testing")
	queue.write(m)
Beispiel #7
0
def notify_worker(id, sizes):
	m = RawMessage()
	msg = json.dumps({"id": id, "sizes": sizes})
	print msg
	m.set_body(msg)
	queue.write(m)