def main():
django.setup()
devices = NetworkDevice.objects.all()
starttime = datetime.now()
for dev in devices:
my_thread = threading.Thread(target=show_version, args=(dev,))
my_thread.start()
main_thread = threading.currentThread()
for thread in threading.enumerate():
if thread != main_thread:
print thread
thread.join()
totaltime = datetime.now() - starttime
print
print "Elapsed time " + str(totaltime)
print
db_connect_sh_ver_w_threads.py 文件源码
python
阅读 26
收藏 0
点赞 0
评论 0
评论列表
文章目录