摘要: 原文出处:http://blog.eood.cn/mq消息系统的作用:异步处理、削减峰值、减少组件之间的耦合。选择消息系统根据业务需要需要考虑以下几个方面:是否持久化吞吐能力高可用分布式扩展能力兼容现有协议易于维护其他,如消息丢失和重复的处理避免单点故障负载均衡常见消息系统协议:STOMPAMQP类... 阅读全文
posted @ 2015-01-13 14:06 AndyRobb 阅读(216) 评论(0) 推荐(0) 编辑
摘要: ''' The Method for getting Local Host IP address under the Linux. '''# Uses the Linux SIOCGIFADDR ioctl to find the IP address associated with a net... 阅读全文
posted @ 2015-01-13 13:57 AndyRobb 阅读(247) 评论(0) 推荐(0) 编辑
摘要: def main_module_name(): mod = sys.modules['__main__'] file = getattr(mod, '__file__', None) return file and os.path.splitext(os.path.basename(file... 阅读全文
posted @ 2015-01-13 13:55 AndyRobb 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 如何获取py文件内的类列表?import pyclbrdef getModuleCls(module_name): return [x for x in pyclbr.readmodule(module_name).keys()]如何动态加载py文件?使用importlib模块的impor... 阅读全文
posted @ 2015-01-13 13:51 AndyRobb 阅读(976) 评论(0) 推荐(0) 编辑