本文整理汇总了Python中DoctorSpring.models.Diagnose.setDiagnoseUploaded方法的典型用法代码示例。如果您正苦于以下问题:Python Diagnose.setDiagnoseUploaded方法的具体用法?Python Diagnose.setDiagnoseUploaded怎么用?Python Diagnose.setDiagnoseUploaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DoctorSpring.models.Diagnose
的用法示例。
在下文中一共展示了Diagnose.setDiagnoseUploaded方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: copyObjects
# 需要导入模块: from DoctorSpring.models import Diagnose [as 别名]
# 或者: from DoctorSpring.models.Diagnose import setDiagnoseUploaded [as 别名]
def copyObjects():
oss = OssAPI(HOST, ACCESS_ID, SECRET_ACCESS_KEY)
bucket="solidmedicaltest"
prefix = "1_c4ca4238a0b923820dcc509a6f75849b/"
marker = ""
delimiter = "/"
maxkeys = "100"
headers = {}
res = oss.get_bucket(bucket, prefix, marker, delimiter, maxkeys, headers)
if (res.status / 100) == 2:
body = res.read()
#print body
h = GetBucketXml(body)
(file_list, common_list) = h.list()
print "object list is:"
for i in file_list:
fileName= i[0]
diagnoseId=getDiagnoseIdFromFileName(fileName)
diagnose=Diagnose.getDiagnoseByDiagnoseSeriesNo(diagnoseId)
if diagnose:
res=oss.copy_object(bucket,fileName,bucket,diagnoseId)
if (res.status / 100) == 2:
fileUrl='http://%s.%s/%s'%(bucket,WEB_HOST,diagnoseId)
Diagnose.setDiagnoseUploaded(diagnoseId)