1 Star 0 Fork 0

gitee_pd/octopus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
multi-check.py 542 Bytes
一键复制 编辑 原始数据 按行查看 历史
suzezhi 提交于 2015-05-04 16:00 +08:00 . add some files
__author__ = 'xiaosu'
from octopus import add_host
from multiprocessing import Pool
def madd(ip):
ip=ip
username="cassandra"
password="cassandra"
myhost=add_host.new_host(ip,username,password,"3",True,True,"test")
myhost.open()
myhost.insert_2_database()
print myhost.result
ips=["10.1.199.71","10.1.199.72","10.1.199.73","10.1.199.74","10.1.199.75","10.1.199.76"]
ips=[]
for i in xrange(70,99):
ip="10.1.199."+str(i)
ips.append(ip)
print ips
pool=Pool()
pool.map(madd,ips)
pool.close()
pool.join()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/wang1205/octopus.git
[email protected]:wang1205/octopus.git
wang1205
octopus
octopus
master

搜索帮助