version 1.61, 2007/01/30 14:26:42
|
version 1.62, 2007/02/02 14:31:49
|
Line 174 class uploadATFfinallyThread(Thread):
|
Line 174 class uploadATFfinallyThread(Thread):
|
conn.close() |
conn.close() |
#set flag for end of this method |
#set flag for end of this method |
self.end=True |
self.end=True |
print "ended" |
logging.info("ended") |
return True |
return True |
|
|
def __del__(self): |
def __del__(self): |
Line 213 class uploadATFfinallyThread(Thread):
|
Line 213 class uploadATFfinallyThread(Thread):
|
uploadFns=[] |
uploadFns=[] |
|
|
#do first the changed files |
#do first the changed files |
|
i=0 |
for fn in uploadFns: |
for fn in uploadFns: |
|
i+=1 |
founds=ctx2.CDLICatalog.search({'title':fn}) |
founds=ctx2.CDLICatalog.search({'title':fn}) |
if len(founds)>0: |
if len(founds)>0: |
SESSION['author']=str(username) |
SESSION['author']=str(username) |
self.result+="<p>Changing : %s"%fn |
self.result+="<p>Changing : %s"%fn |
founds[0].getObject().manage_addCDLIFileObject('',comment,SESSION['author'],file=os.path.join(SESSION['tmpdir'],fn),from_tmp=True) |
founds[0].getObject().manage_addCDLIFileObject('',comment,SESSION['author'],file=os.path.join(SESSION['tmpdir'],fn),from_tmp=True) |
|
if i==200: |
|
i=0 |
|
transaction.get().commit() |
|
logging.info("changing: do commit") |
|
transaction.get().commit() |
|
logging.info("changing: last commit") |
|
|
#now add the new files |
#now add the new files |
newPs=SESSION['newPs'] |
newPs=SESSION['newPs'] |