本文整理汇总了Python中boto.sqs.message.RawMessage.get_body方法的典型用法代码示例。如果您正苦于以下问题:Python RawMessage.get_body方法的具体用法?Python RawMessage.get_body怎么用?Python RawMessage.get_body使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boto.sqs.message.RawMessage
的用法示例。
在下文中一共展示了RawMessage.get_body方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from boto.sqs.message import RawMessage [as 别名]
# 或者: from boto.sqs.message.RawMessage import get_body [as 别名]
}
taskQueue.write(m) # to write the message in queue
print 'All tasks have been sent to SQS successfully.\n'
tasks.seek(0)
resQueue = conn.get_queue("resQueue") # Result queue to get data from Worker.
#tasks.seek(0)
i = 0
rs = resQueue.get_messages()
#print len(rs)
#print len(tasks.readlines())
#tasks.seek(0)
while i < len(tasks.readlines()): # To poll until all values come from worker.
#print i
if len(rs):
i+=1
m = rs[0]
print "Task Completed: " + m.get_body()
resQueue.delete_message(m)
rs = resQueue.get_messages()
tasks.seek(0)
endtime = time()
print "Total Time taken by Remote Worker is {} sec".format(endtime-start) # For finding the time.
print 'All results have been retreived from SQS.\n'