print "name of %s is not correct"%dstfile continue #get bossVer,eventNum,dataType,fileSize,LFN,eventType,expNum, #resonance,runH,runL,status,streamId,description attributes = obj.getAttributes() if attributes==0: continue else: #get Guid attributes["guid"] = uuid.uuid1() #get Date now = time.localtime() date = time.strftime('%Y-%m-%d %H:%M:%S',now) attributes["date"] = date print 100*"#" #print attributes insertTime = insertTime+insert(attributes) totalEnd = time.time() totalTime = totalEnd-totalStart num = linenum - linefrm print "The number of files you have inserted :%d" %num print "Time of inserting into catalogue is:%s" %str(insertTime) print "Total time is:%s"%str(totalTime)
#print "attributes:",attributes if attributes=='error': continue else: #get Guid attributes["guid"] = uuid.uuid1() #get Date now = time.localtime() date = time.strftime('%Y-%m-%d %H:%M:%S',now) attributes["date"] = date #print attributes if len(checkattributes)==0: insert(attributes) #print "insert" else: errorlist = compare(attributes,checkattributes) if len(errorlist)!=0: print dstfile print "Error for attributes below" for key in errorlist.keys(): print "%s in amga:%s input:%s"%(key,errorlist[key],checkattributes[key]) end = time.time() totaltime = end - start num = linenum - linefrm
elif type == None: print "name of %s is not correct" % dstfile continue #get bossVer,eventNum,dataType,fileSize,LFN,eventType,expNum, #resonance,runH,runL,status,streamId,description attributes = obj.getAttributes() if attributes == 0: continue else: #get Guid attributes["guid"] = uuid.uuid1() #get Date now = time.localtime() date = time.strftime('%Y-%m-%d %H:%M:%S', now) attributes["date"] = date print 100 * "#" #print attributes insertTime = insertTime + insert(attributes) totalEnd = time.time() totalTime = totalEnd - totalStart num = linenum - linefrm print "The number of files you have inserted :%d" % num print "Time of inserting into catalogue is:%s" % str(insertTime) print "Total time is:%s" % str(totalTime)