def notify_worker(id, sizes): jsonMessage = json.dumps( { 'id': id, 'sizes': sizes } ) message = Message() message.set_body(jsonMessage) queue.write(message)
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)
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)
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)
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)
def notify_worker(id, sizes): m = RawMessage() msg = json.dumps({"id": id, "sizes": sizes}) print msg m.set_body(msg) queue.write(m)