PYTHON分布式任务系统GEARMAN解析
发布时间:2020-12-17 17:49:43 所属栏目:Python 来源:网络整理
导读:对python这个高级语言感兴趣的小伙伴,下面一起跟随编程之家 jb51.cc的小编两巴掌来看看吧! 了解Gearman,请访问gearman官网:http://gearman.org/index.php?id=getting_started Gearman for Python API Doc: http://pythonhosted.org/gearman/ 安装Gearman:
对python这个高级语言感兴趣的小伙伴,下面一起跟随编程之家 52php.cn的小编两巴掌来看看吧!
了解Gearman,请访问gearman官网:http://gearman.org/index.php?id=getting_started Gearman for Python API Doc: http://pythonhosted.org/gearman/ 安装Gearman: 基础依赖库:
安装Gearman Python客户端
获取直接用自动安装: easy_install gearman 启动服务:gearmand -d 启动Worker:gearman -w -f wc -- wc -l & -w 代表启动的是worker,-f wc 代表启动一个task名字为wc, -- wc -l表示这个task是做wc -l 统计行数。 启动Client:gearman -f wc < /etc/passwd python work代码:
python client代码:
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |