明霞山资源网 Design By www.htccd.com
#!/usr/bin/env python
#coding:utf8
import os,sys import md5,tab from mysql_co.my_db import set_mysql from ssh_co.ssh_connect import sshd from ssh_co.cfg.config import ssh_message,item_path from file import findfile def my_mysql():
db_file={}
my_connect=set_mysql()
f_file=findfile.main(item_path)
list_file=findfile.file_list(f_file)
see_file=my_connect.display_db()
for knumber,kname,ksgin,ksize,katime,kmtime in see_file:
db_file[kname]=[ksgin,ksize,katime,kmtime]
for fname,fsize,fatime,fmtime in list_file:
if fname in db_file.keys():
if ("%f")%fmtime == ("%f")%db_file[fname][3]:
print "%s The same mtime pass"%fname
my_connect.set_file_attribute(10,fname,fmtime)
pass
else:
print "%s different for mtime"%fname
my_connect.set_file_attribute(11,fname,fmtime)
else:
my_connect.add_db(fname,fsize,fatime,fmtime)
my_connect.set_file_attribute(11,fname,fmtime)
print "%s,is new file"%fname
new_file=my_connect.new_db()
my_connect.disconn_db()
return new_file def my_ssh(new_file):
pid_host = 1
for host_attribute in ssh_message:
ssh_conn=sshd(host_attribute,pid_host)
for file_name in new_file:
if file_name:
a=ssh_conn.put_ssh_file(file_name[1])
print a
print "ssh_connect memoryID: %s" %pid_host
else:
pid_host = id(host_attribute)
ssh_conn.disconn_ssh() def main():
new_file=my_mysql()
my_ssh(new_file)
if __name__ == "__main__":
main()
标签:
python,批量同步
明霞山资源网 Design By www.htccd.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
明霞山资源网 Design By www.htccd.com
暂无评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。